{"action":"created","issue":{"url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/886","labels_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/886/labels{/name}","comments_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/886/comments","events_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/886/events","html_url":"https://github.com/cytoscape/cytoscape.js/issues/886","id":64646437,"number":886,"title":"Remove eles.show() and eles.hide() from the API","user":{"login":"atiasnir","id":2745142,"avatar_url":"https://avatars.githubusercontent.com/u/2745142?v=3","gravatar_id":"","url":"https://api.github.com/users/atiasnir","html_url":"https://github.com/atiasnir","followers_url":"https://api.github.com/users/atiasnir/followers","following_url":"https://api.github.com/users/atiasnir/following{/other_user}","gists_url":"https://api.github.com/users/atiasnir/gists{/gist_id}","starred_url":"https://api.github.com/users/atiasnir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atiasnir/subscriptions","organizations_url":"https://api.github.com/users/atiasnir/orgs","repos_url":"https://api.github.com/users/atiasnir/repos","events_url":"https://api.github.com/users/atiasnir/events{/privacy}","received_events_url":"https://api.github.com/users/atiasnir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cytoscape/cytoscape.js/labels/1-high-priority","name":"1-high-priority","color":"e11d21"},{"url":"https://api.github.com/repos/cytoscape/cytoscape.js/labels/enhancement","name":"enhancement","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cytoscape/cytoscape.js/milestones/20","html_url":"https://github.com/cytoscape/cytoscape.js/milestones/2.4.0","labels_url":"https://api.github.com/repos/cytoscape/cytoscape.js/milestones/20/labels","id":740088,"number":20,"title":"2.4.0","description":"","creator":{"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},"open_issues":1,"closed_issues":58,"state":"open","created_at":"2014-08-01T18:37:15Z","updated_at":"2015-05-07T19:45:59Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-03-26T22:21:39Z","updated_at":"2015-05-08T16:29:56Z","closed_at":"2015-03-31T17:12:57Z","body":"I've got a few hidden nodes and edges in my network. \r\n\r\nWhen I serialize the network into a json (`data = cy.json()`) these elements do not serialize their style (in particular `display: none;` is not serialized). Thus, when loading the network again (for instance with `cy.add(data.elements)`), the elements will be visible. \r\n\r\nA hack would be to add the \"hidden\" attribute to the JSON, for instance:\r\n1. In `$$.elesfn.json` add `hidden: ele.hidden()` to the `var json = $$.util.copy({...})` block.\r\n2. In `$$.Element` add `if( params.hidden ) { this.hide(); }` at the very end of the function.\r\n(in fact, that's my quick workaround for this) \r\n\r\nI'm guessing there's a more refined way of accomplishing this (I'm not even sure if this breaks compatibility with the desktop version regarding the JSON exchange). \r\n"},"comment":{"url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/comments/100287528","html_url":"https://github.com/cytoscape/cytoscape.js/issues/886#issuecomment-100287528","issue_url":"https://api.github.com/repos/cytoscape/cytoscape.js/issues/886","id":100287528,"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-05-08T16:29:56Z","updated_at":"2015-05-08T16:29:56Z","body":"It's a docs-only change for backwards compatibility."}}