{"action":"created","issue":{"url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/857","labels_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/857/labels{/name}","comments_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/857/comments","events_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/857/events","html_url":"https://github.com/cytoscape/cytoscape.js/issues/857","id":60525547,"number":857,"title":"Limit graph","user":{"login":"Giant2","id":8668395,"avatar_url":"https://avatars.githubusercontent.com/u/8668395?v=3","gravatar_id":"","url":"https://api.github.com/users/Giant2","html_url":"https://github.com/Giant2","followers_url":"https://api.github.com/users/Giant2/followers","following_url":"https://api.github.com/users/Giant2/following{/other_user}","gists_url":"https://api.github.com/users/Giant2/gists{/gist_id}","starred_url":"https://api.github.com/users/Giant2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Giant2/subscriptions","organizations_url":"https://api.github.com/users/Giant2/orgs","repos_url":"https://api.github.com/users/Giant2/repos","events_url":"https://api.github.com/users/Giant2/events{/privacy}","received_events_url":"https://api.github.com/users/Giant2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-10T16:15:11Z","updated_at":"2015-03-10T17:40:26Z","closed_at":"2015-03-10T17:40:26Z","body":"I have a graph with preset layout. The user can move the node in the area.\r\nI need to limit the moving area because if a node is positioned out the visible area I cannot move it anymore.\r\nThe idea I had is to intercept the mouse after the \"drop\" and, if the drop is out of the area (position with negative number) cy.resize() and cy.fit()\r\nIs this the correct way to limit the movements? How can I intercept this kind of \"drop\" event?\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/comments/78106781","html_url":"https://github.com/cytoscape/cytoscape.js/issues/857#issuecomment-78106781","issue_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/857","id":78106781,"user":{"login":"maxkfranz","id":989043,"avatar_url":"https://avatars.githubusercontent.com/u/989043?v=3","gravatar_id":"","url":"https://api.github.com/users/maxkfranz","html_url":"https://github.com/maxkfranz","followers_url":"https://api.github.com/users/maxkfranz/followers","following_url":"https://api.github.com/users/maxkfranz/following{/other_user}","gists_url":"https://api.github.com/users/maxkfranz/gists{/gist_id}","starred_url":"https://api.github.com/users/maxkfranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxkfranz/subscriptions","organizations_url":"https://api.github.com/users/maxkfranz/orgs","repos_url":"https://api.github.com/users/maxkfranz/repos","events_url":"https://api.github.com/users/maxkfranz/events{/privacy}","received_events_url":"https://api.github.com/users/maxkfranz/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T17:40:26Z","updated_at":"2015-03-10T17:40:26Z","body":"You can set the position of a node via `node.position()` inside the viewport extent (i.e. `cy.extent()`) on `free` events."}}