{"action":"created","issue":{"url":"https://api.github.com/repos/jsxgraph/jsxgraph/issues/206","repository_url":"https://api.github.com/repos/jsxgraph/jsxgraph","labels_url":"https://api.github.com/repos/jsxgraph/jsxgraph/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/jsxgraph/jsxgraph/issues/206/comments","events_url":"https://api.github.com/repos/jsxgraph/jsxgraph/issues/206/events","html_url":"https://github.com/jsxgraph/jsxgraph/issues/206","id":186024007,"number":206,"title":"Slider rerenders whole board when slider value is not updated","user":{"login":"kasperpeulen","id":1035299,"avatar_url":"https://avatars.githubusercontent.com/u/1035299?v=3","gravatar_id":"","url":"https://api.github.com/users/kasperpeulen","html_url":"https://github.com/kasperpeulen","followers_url":"https://api.github.com/users/kasperpeulen/followers","following_url":"https://api.github.com/users/kasperpeulen/following{/other_user}","gists_url":"https://api.github.com/users/kasperpeulen/gists{/gist_id}","starred_url":"https://api.github.com/users/kasperpeulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasperpeulen/subscriptions","organizations_url":"https://api.github.com/users/kasperpeulen/orgs","repos_url":"https://api.github.com/users/kasperpeulen/repos","events_url":"https://api.github.com/users/kasperpeulen/events{/privacy}","received_events_url":"https://api.github.com/users/kasperpeulen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-28T21:16:38Z","updated_at":"2016-11-01T11:00:00Z","closed_at":null,"body":"I have here an animation:\nhttps://sowiso-animations.firebaseapp.com/rational_number.html\n\nI was noticing that even if the slider doesn't change value, the whole board is updated just by clicking the slider, and slightly moving it.\n\nIn my case, where some mathjax is used, this makes this simple animation very heavy. This is also because the mathjax of the label seems to be recalculated (even though the label text is not changed).\n\nNot sure if this is the expected behaviour, or if you have any tips avoiding too much recalculations. I have made most animations css animations, which helps a lot getting it smoother:\n\n``` javascript\nJXG.Line.prototype.setOpacity = function (opacity, duration = durationDefault) {\n  this.rendNode.style.transition = `stroke-opacity ${duration}ms`;\n  this.rendNodeTriangleEnd.style.transition = `fill-opacity ${duration}ms`;\n  this.visProp['strokeopacity'] = opacity;\n\n  setTimeout(() => {\n    this.rendNode.setAttribute('stroke-opacity', opacity);\n    this.rendNodeTriangleEnd.setAttribute('fill-opacity', opacity);\n  }, 1)\n};\n\nJXG.Ticks.prototype.setOpacity = function (opacity, duration = durationDefault) {\n  this.rendNode.style.transition = `stroke-opacity ${duration}ms`;\n  setTimeout(() => {\n    this.rendNode.setAttribute('stroke-opacity', opacity);\n    this.visProp['strokeopacity'] = opacity;\n  }, 1);\n};\n\nJXG.Ticks.prototype.setOpacityLabel = function (opacity, duration = durationDefault) {\n  this.labels.forEach(l => {\n    l.rendNode.style.transition = `opacity ${duration}ms`;\n    l.rendNode.style.opacity = opacity;\n  });\n};\n```\n"},"comment":{"url":"https://api.github.com/repos/jsxgraph/jsxgraph/issues/comments/257539518","html_url":"https://github.com/jsxgraph/jsxgraph/issues/206#issuecomment-257539518","issue_url":"https://api.github.com/repos/jsxgraph/jsxgraph/issues/206","id":257539518,"user":{"login":"alfredwassermann","id":986107,"avatar_url":"https://avatars.githubusercontent.com/u/986107?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredwassermann","html_url":"https://github.com/alfredwassermann","followers_url":"https://api.github.com/users/alfredwassermann/followers","following_url":"https://api.github.com/users/alfredwassermann/following{/other_user}","gists_url":"https://api.github.com/users/alfredwassermann/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredwassermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredwassermann/subscriptions","organizations_url":"https://api.github.com/users/alfredwassermann/orgs","repos_url":"https://api.github.com/users/alfredwassermann/repos","events_url":"https://api.github.com/users/alfredwassermann/events{/privacy}","received_events_url":"https://api.github.com/users/alfredwassermann/received_events","type":"User","site_admin":false},"created_at":"2016-11-01T11:00:00Z","updated_at":"2016-11-01T11:00:00Z","body":"CSS transitions for color and opacity changes are implemented now. There is a new attribute transitionDuration (defaults to 200). \r\n\r\n@kasperpeulen \r\nI will have a look at Mathjax and try to prevent the unnecessary rerendering."}}
{"actor":{"display_login":"alfredwassermann"}}