{"action":"created","issue":{"url":"https://api.github.com/repos/plotly/plotly.js/issues/132","labels_url":"https://api.github.com/repos/plotly/plotly.js/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/plotly/plotly.js/issues/132/comments","events_url":"https://api.github.com/repos/plotly/plotly.js/issues/132/events","html_url":"https://github.com/plotly/plotly.js/pull/132","id":122829733,"number":132,"title":"Halt the 2D render loop when the canvas is removed.","user":{"login":"emackey","id":1235080,"avatar_url":"https://avatars.githubusercontent.com/u/1235080?v=3","gravatar_id":"","url":"https://api.github.com/users/emackey","html_url":"https://github.com/emackey","followers_url":"https://api.github.com/users/emackey/followers","following_url":"https://api.github.com/users/emackey/following{/other_user}","gists_url":"https://api.github.com/users/emackey/gists{/gist_id}","starred_url":"https://api.github.com/users/emackey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emackey/subscriptions","organizations_url":"https://api.github.com/users/emackey/orgs","repos_url":"https://api.github.com/users/emackey/repos","events_url":"https://api.github.com/users/emackey/events{/privacy}","received_events_url":"https://api.github.com/users/emackey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-17T21:47:00Z","updated_at":"2016-01-05T16:53:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/plotly/plotly.js/pulls/132","html_url":"https://github.com/plotly/plotly.js/pull/132","diff_url":"https://github.com/plotly/plotly.js/pull/132.diff","patch_url":"https://github.com/plotly/plotly.js/pull/132.patch"},"body":"This is a partial fix for [plotly.js#126](https://github.com/plotly/plotly.js/issues/126) that will stop the 2D GL render loop when its canvas is removed from `document.body`.\r\n\r\nThe advantage of this approach is that it works even if `purge` is never called, for example when using `Tabs.fresh()` in the test dashboard.  Any removal of the plot from the page at any level is enough to shut down the rendering.\r\n\r\nA separate fix is still needed to address the same issue in 3D scenes."},"comment":{"url":"https://api.github.com/repos/plotly/plotly.js/issues/comments/169059299","html_url":"https://github.com/plotly/plotly.js/pull/132#issuecomment-169059299","issue_url":"https://api.github.com/repos/plotly/plotly.js/issues/132","id":169059299,"user":{"login":"etpinard","id":6675409,"avatar_url":"https://avatars.githubusercontent.com/u/6675409?v=3","gravatar_id":"","url":"https://api.github.com/users/etpinard","html_url":"https://github.com/etpinard","followers_url":"https://api.github.com/users/etpinard/followers","following_url":"https://api.github.com/users/etpinard/following{/other_user}","gists_url":"https://api.github.com/users/etpinard/gists{/gist_id}","starred_url":"https://api.github.com/users/etpinard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etpinard/subscriptions","organizations_url":"https://api.github.com/users/etpinard/orgs","repos_url":"https://api.github.com/users/etpinard/repos","events_url":"https://api.github.com/users/etpinard/events{/privacy}","received_events_url":"https://api.github.com/users/etpinard/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T16:53:13Z","updated_at":"2016-01-05T16:53:13Z","body":"@emackey Happy new year to you too. Thanks for your feedback.\r\n\r\nWhat if we stored the `requestAnimationFrame` id in the scene object and call `cancelAnimationFrame(id)` upon context lost, as suggested [here](http://stackoverflow.com/a/10748750/4068492) ?\r\n\r\nWould that solve this issue or am I missing something?"}}