{"action":"created","issue":{"url":"https://api.github.com/repos/Linkurious/linkurious.js/issues/213","labels_url":"https://api.github.com/repos/Linkurious/linkurious.js/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/Linkurious/linkurious.js/issues/213/comments","events_url":"https://api.github.com/repos/Linkurious/linkurious.js/issues/213/events","html_url":"https://github.com/Linkurious/linkurious.js/issues/213","id":97022707,"number":213,"title":"`onMove` render two times during a panning event","user":{"login":"mdamien","id":1469823,"avatar_url":"https://avatars.githubusercontent.com/u/1469823?v=3","gravatar_id":"","url":"https://api.github.com/users/mdamien","html_url":"https://github.com/mdamien","followers_url":"https://api.github.com/users/mdamien/followers","following_url":"https://api.github.com/users/mdamien/following{/other_user}","gists_url":"https://api.github.com/users/mdamien/gists{/gist_id}","starred_url":"https://api.github.com/users/mdamien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdamien/subscriptions","organizations_url":"https://api.github.com/users/mdamien/orgs","repos_url":"https://api.github.com/users/mdamien/repos","events_url":"https://api.github.com/users/mdamien/events{/privacy}","received_events_url":"https://api.github.com/users/mdamien/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Linkurious/linkurious.js/labels/type:bug","name":"type:bug","color":"fc2929"},{"url":"https://api.github.com/repos/Linkurious/linkurious.js/labels/where:core","name":"where:core","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"mdamien","id":1469823,"avatar_url":"https://avatars.githubusercontent.com/u/1469823?v=3","gravatar_id":"","url":"https://api.github.com/users/mdamien","html_url":"https://github.com/mdamien","followers_url":"https://api.github.com/users/mdamien/followers","following_url":"https://api.github.com/users/mdamien/following{/other_user}","gists_url":"https://api.github.com/users/mdamien/gists{/gist_id}","starred_url":"https://api.github.com/users/mdamien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdamien/subscriptions","organizations_url":"https://api.github.com/users/mdamien/orgs","repos_url":"https://api.github.com/users/mdamien/repos","events_url":"https://api.github.com/users/mdamien/events{/privacy}","received_events_url":"https://api.github.com/users/mdamien/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Linkurious/linkurious.js/milestones/5","html_url":"https://github.com/Linkurious/linkurious.js/milestones/v1.1.0","labels_url":"https://api.github.com/repos/Linkurious/linkurious.js/milestones/5/labels","id":1172042,"number":5,"title":"v1.1.0","description":"","creator":{"login":"sheymann","id":177962,"avatar_url":"https://avatars.githubusercontent.com/u/177962?v=3","gravatar_id":"","url":"https://api.github.com/users/sheymann","html_url":"https://github.com/sheymann","followers_url":"https://api.github.com/users/sheymann/followers","following_url":"https://api.github.com/users/sheymann/following{/other_user}","gists_url":"https://api.github.com/users/sheymann/gists{/gist_id}","starred_url":"https://api.github.com/users/sheymann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheymann/subscriptions","organizations_url":"https://api.github.com/users/sheymann/orgs","repos_url":"https://api.github.com/users/sheymann/repos","events_url":"https://api.github.com/users/sheymann/events{/privacy}","received_events_url":"https://api.github.com/users/sheymann/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":3,"state":"open","created_at":"2015-06-19T09:09:31Z","updated_at":"2015-07-28T16:11:22Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-07-24T10:30:28Z","updated_at":"2015-07-29T16:20:10Z","closed_at":null,"body":"As found in #211, `onMove` is called two times during panning\r\n\r\n![chart](http://i.imgur.com/aJnee6q.png)\r\n\r\nAfter a bit of detective work, `onMove` is binded to `mousemove` and `render` so it's why it's called two times.\r\n\r\nhttps://github.com/Linkurious/linkurious.js/blob/develop/src/misc/sigma.misc.bindEvents.js#L499-L503\r\n\r\n```javascript\r\n      // Bind events:\r\n      captor.bind('click', onClick);\r\n      captor.bind('mousedown', onMove);\r\n      captor.bind('mouseup', onMove);\r\n      captor.bind('mousemove', onMove);\r\n      captor.bind('mouseout', onOut);\r\n      captor.bind('doubleclick', onDoubleClick);\r\n      captor.bind('rightclick', onRightClick);\r\n      self.bind('render', onMove);\r\n    }\r\n```\r\n\r\nRemoving `self.bind('render', onMove);` fix the bug"},"comment":{"url":"https://api.github.com/repos/Linkurious/linkurious.js/issues/comments/126006239","html_url":"https://github.com/Linkurious/linkurious.js/issues/213#issuecomment-126006239","issue_url":"https://api.github.com/repos/Linkurious/linkurious.js/issues/213","id":126006239,"user":{"login":"sheymann","id":177962,"avatar_url":"https://avatars.githubusercontent.com/u/177962?v=3","gravatar_id":"","url":"https://api.github.com/users/sheymann","html_url":"https://github.com/sheymann","followers_url":"https://api.github.com/users/sheymann/followers","following_url":"https://api.github.com/users/sheymann/following{/other_user}","gists_url":"https://api.github.com/users/sheymann/gists{/gist_id}","starred_url":"https://api.github.com/users/sheymann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheymann/subscriptions","organizations_url":"https://api.github.com/users/sheymann/orgs","repos_url":"https://api.github.com/users/sheymann/repos","events_url":"https://api.github.com/users/sheymann/events{/privacy}","received_events_url":"https://api.github.com/users/sheymann/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T16:20:10Z","updated_at":"2015-07-29T16:20:10Z","body":"`updateHovers` is opinionated on an application of the visualization state, while `out/over` events only describes a state so are more neutral."}}