{"action":"created","issue":{"url":"https://api.github.com/repos/arose/nglview/issues/24","repository_url":"https://api.github.com/repos/arose/nglview","labels_url":"https://api.github.com/repos/arose/nglview/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/arose/nglview/issues/24/comments","events_url":"https://api.github.com/repos/arose/nglview/issues/24/events","html_url":"https://github.com/arose/nglview/issues/24","id":129098113,"number":24,"title":"better add_representation","user":{"login":"hainm","id":4451957,"avatar_url":"https://avatars.githubusercontent.com/u/4451957?v=3","gravatar_id":"","url":"https://api.github.com/users/hainm","html_url":"https://github.com/hainm","followers_url":"https://api.github.com/users/hainm/followers","following_url":"https://api.github.com/users/hainm/following{/other_user}","gists_url":"https://api.github.com/users/hainm/gists{/gist_id}","starred_url":"https://api.github.com/users/hainm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hainm/subscriptions","organizations_url":"https://api.github.com/users/hainm/orgs","repos_url":"https://api.github.com/users/hainm/repos","events_url":"https://api.github.com/users/hainm/events{/privacy}","received_events_url":"https://api.github.com/users/hainm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/arose/nglview/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-27T10:25:24Z","updated_at":"2016-04-30T04:53:43Z","closed_at":"2016-04-30T04:53:43Z","body":"currently whenever `add_representation` is called, the viewer is re-rendered (?) so the transition is not smooth (structure disappears and reload).\r\n\r\ntry yourself in notebook\r\n\r\n1st cell\r\n\r\n```python\r\nimport pytraj as pt\r\nimport nglview as nv\r\n\r\nt0 = pt.fetch_pdb('3pqr')\r\nview = nv.show_pytraj(t0)\r\n\r\nview.representations = []\r\nview.add_representation('cartoon', color='residueindex')\r\nview\r\n```\r\n\r\n2nd cell (cause non-smooth transition)\r\n```python\r\nview.add_representation('label', '.CA', color='blue')\r\n```"},"comment":{"url":"https://api.github.com/repos/arose/nglview/issues/comments/215937753","html_url":"https://github.com/arose/nglview/issues/24#issuecomment-215937753","issue_url":"https://api.github.com/repos/arose/nglview/issues/24","id":215937753,"user":{"login":"hainm","id":4451957,"avatar_url":"https://avatars.githubusercontent.com/u/4451957?v=3","gravatar_id":"","url":"https://api.github.com/users/hainm","html_url":"https://github.com/hainm","followers_url":"https://api.github.com/users/hainm/followers","following_url":"https://api.github.com/users/hainm/following{/other_user}","gists_url":"https://api.github.com/users/hainm/gists{/gist_id}","starred_url":"https://api.github.com/users/hainm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hainm/subscriptions","organizations_url":"https://api.github.com/users/hainm/orgs","repos_url":"https://api.github.com/users/hainm/repos","events_url":"https://api.github.com/users/hainm/events{/privacy}","received_events_url":"https://api.github.com/users/hainm/received_events","type":"User","site_admin":false},"created_at":"2016-04-30T04:53:42Z","updated_at":"2016-04-30T04:53:42Z","body":"closed by https://github.com/arose/nglview/pull/73"}}