{"action":"opened","issue":{"url":"https://api.github.com/repos/enjalot/blockbuilder/issues/136","repository_url":"https://api.github.com/repos/enjalot/blockbuilder","labels_url":"https://api.github.com/repos/enjalot/blockbuilder/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/enjalot/blockbuilder/issues/136/comments","events_url":"https://api.github.com/repos/enjalot/blockbuilder/issues/136/events","html_url":"https://github.com/enjalot/blockbuilder/issues/136","id":150809731,"number":136,"title":"Live preview could keep its state the same","user":{"login":"lmatteis","id":535442,"avatar_url":"https://avatars.githubusercontent.com/u/535442?v=3","gravatar_id":"","url":"https://api.github.com/users/lmatteis","html_url":"https://github.com/lmatteis","followers_url":"https://api.github.com/users/lmatteis/followers","following_url":"https://api.github.com/users/lmatteis/following{/other_user}","gists_url":"https://api.github.com/users/lmatteis/gists{/gist_id}","starred_url":"https://api.github.com/users/lmatteis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmatteis/subscriptions","organizations_url":"https://api.github.com/users/lmatteis/orgs","repos_url":"https://api.github.com/users/lmatteis/repos","events_url":"https://api.github.com/users/lmatteis/events{/privacy}","received_events_url":"https://api.github.com/users/lmatteis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-25T10:03:41Z","updated_at":"2016-04-25T10:03:41Z","closed_at":null,"body":"Hi there. So I've talked about this on Twitter but I was thinking that the live-preview feature is awesome but at the same time, you lose the state you were in. I was thinking, since D3 exposes the update sets (from the joins), why not keep the live preview DOM the same, and re-execute the JS on top of it - if it's well written d3 (with well handled enter/update/exit sets), then the preview should update seamlessly.\r\n\r\nI would love this feature because I'm often building complex interactions, and I need to change parameters at a specific state I am in (after having clicked a bunch of buttons). Currently the preview is redrawn and I have to repeat my interactions every time.\r\n\r\nSomething similar could also be done for the stylesheets - figure out if they change and only update the `<style/>` portions in the DOM."}}