{"action":"created","issue":{"url":"https://api.github.com/repos/almende/vis/issues/3140","repository_url":"https://api.github.com/repos/almende/vis","labels_url":"https://api.github.com/repos/almende/vis/issues/3140/labels{/name}","comments_url":"https://api.github.com/repos/almende/vis/issues/3140/comments","events_url":"https://api.github.com/repos/almende/vis/issues/3140/events","html_url":"https://github.com/almende/vis/issues/3140","id":234097952,"number":3140,"title":"Where / How to drag event","user":{"login":"ts1404","id":28776499,"avatar_url":"https://avatars3.githubusercontent.com/u/28776499?v=4","gravatar_id":"","url":"https://api.github.com/users/ts1404","html_url":"https://github.com/ts1404","followers_url":"https://api.github.com/users/ts1404/followers","following_url":"https://api.github.com/users/ts1404/following{/other_user}","gists_url":"https://api.github.com/users/ts1404/gists{/gist_id}","starred_url":"https://api.github.com/users/ts1404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ts1404/subscriptions","organizations_url":"https://api.github.com/users/ts1404/orgs","repos_url":"https://api.github.com/users/ts1404/repos","events_url":"https://api.github.com/users/ts1404/events{/privacy}","received_events_url":"https://api.github.com/users/ts1404/received_events","type":"User","site_admin":false},"labels":[{"id":82640305,"url":"https://api.github.com/repos/almende/vis/labels/Network","name":"Network","color":"009800","default":false},{"id":36077697,"url":"https://api.github.com/repos/almende/vis/labels/Question","name":"Question","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-06-07T05:39:54Z","updated_at":"2017-07-24T20:07:25Z","closed_at":null,"body":"![beforedrag](https://user-images.githubusercontent.com/28776499/26863226-3fe12eb8-4b8c-11e7-9f73-583f912dceae.png)\r\nno 1 Before Non-node drag\r\n![afterdrag](https://user-images.githubusercontent.com/28776499/26863232-45918e34-4b8c-11e7-9c28-02032021b36c.png)\r\nno 2 After Non-node drag\r\n![nodedrag](https://user-images.githubusercontent.com/28776499/26863231-45583a94-4b8c-11e7-8eda-eb4281b24247.png)\r\nno 3 Node Drag\r\n\r\nI'm curious about the drag event.\r\n\r\n1.\r\nWhen you drag the background from the demo, the entire network is moving. (no 1 ~ 2)\r\nCan I tell where this feature is located?\r\n\r\n2.\r\nCan I find the Node Drag Event feature?\r\n\r\n3.\r\nIf you drag the lines of node 3 and node 1, can nodes 1 and 3 move equally as the mouse moves?\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/almende/vis/issues/comments/317539121","html_url":"https://github.com/almende/vis/issues/3140#issuecomment-317539121","issue_url":"https://api.github.com/repos/almende/vis/issues/3140","id":317539121,"user":{"login":"rjbriody","id":492786,"avatar_url":"https://avatars0.githubusercontent.com/u/492786?v=4","gravatar_id":"","url":"https://api.github.com/users/rjbriody","html_url":"https://github.com/rjbriody","followers_url":"https://api.github.com/users/rjbriody/followers","following_url":"https://api.github.com/users/rjbriody/following{/other_user}","gists_url":"https://api.github.com/users/rjbriody/gists{/gist_id}","starred_url":"https://api.github.com/users/rjbriody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjbriody/subscriptions","organizations_url":"https://api.github.com/users/rjbriody/orgs","repos_url":"https://api.github.com/users/rjbriody/repos","events_url":"https://api.github.com/users/rjbriody/events{/privacy}","received_events_url":"https://api.github.com/users/rjbriody/received_events","type":"User","site_admin":false},"created_at":"2017-07-24T20:07:25Z","updated_at":"2017-07-24T20:07:25Z","body":"Ah, seems so obvious now.\r\n\r\nIn case this is helpful to anyone else, here is a snippet for syncing a DataSet after a dragEnd event:\r\n\r\n```\r\n            const newPositions = this.network.getPositions(event.nodes);\r\n            datasets.nodes.update(\r\n                datasets.nodes.get(event.nodes).map(n => {\r\n                    n.x = newPositions[n.id].x;\r\n                    n.y = newPositions[n.id].y;\r\n                    return n;\r\n                })\r\n            );\r\n```\r\n\r\nThx @wimrijnders "}}
{"actor":{"display_login":"rjbriody"}}