{"action":"closed","issue":{"url":"https://api.github.com/repos/Gapminder/vizabi/issues/1727","repository_url":"https://api.github.com/repos/Gapminder/vizabi","labels_url":"https://api.github.com/repos/Gapminder/vizabi/issues/1727/labels{/name}","comments_url":"https://api.github.com/repos/Gapminder/vizabi/issues/1727/comments","events_url":"https://api.github.com/repos/Gapminder/vizabi/issues/1727/events","html_url":"https://github.com/Gapminder/vizabi/issues/1727","id":153732289,"number":1727,"title":"Resize event results in unnecessary redrawings, delivered through model change which should not happen on resize","user":{"login":"angieskazka","id":3648190,"avatar_url":"https://avatars.githubusercontent.com/u/3648190?v=3","gravatar_id":"","url":"https://api.github.com/users/angieskazka","html_url":"https://github.com/angieskazka","followers_url":"https://api.github.com/users/angieskazka/followers","following_url":"https://api.github.com/users/angieskazka/following{/other_user}","gists_url":"https://api.github.com/users/angieskazka/gists{/gist_id}","starred_url":"https://api.github.com/users/angieskazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angieskazka/subscriptions","organizations_url":"https://api.github.com/users/angieskazka/orgs","repos_url":"https://api.github.com/users/angieskazka/repos","events_url":"https://api.github.com/users/angieskazka/events{/privacy}","received_events_url":"https://api.github.com/users/angieskazka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Gapminder/vizabi/labels/type:%20enhancement","name":"type: enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"dab2000","id":3511460,"avatar_url":"https://avatars.githubusercontent.com/u/3511460?v=3","gravatar_id":"","url":"https://api.github.com/users/dab2000","html_url":"https://github.com/dab2000","followers_url":"https://api.github.com/users/dab2000/followers","following_url":"https://api.github.com/users/dab2000/following{/other_user}","gists_url":"https://api.github.com/users/dab2000/gists{/gist_id}","starred_url":"https://api.github.com/users/dab2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dab2000/subscriptions","organizations_url":"https://api.github.com/users/dab2000/orgs","repos_url":"https://api.github.com/users/dab2000/repos","events_url":"https://api.github.com/users/dab2000/events{/privacy}","received_events_url":"https://api.github.com/users/dab2000/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Gapminder/vizabi/milestones/47","html_url":"https://github.com/Gapminder/vizabi/milestones/Release%200.13.10","labels_url":"https://api.github.com/repos/Gapminder/vizabi/milestones/47/labels","id":1737723,"number":47,"title":"Release 0.13.10","description":"","creator":{"login":"angieskazka","id":3648190,"avatar_url":"https://avatars.githubusercontent.com/u/3648190?v=3","gravatar_id":"","url":"https://api.github.com/users/angieskazka","html_url":"https://github.com/angieskazka","followers_url":"https://api.github.com/users/angieskazka/followers","following_url":"https://api.github.com/users/angieskazka/following{/other_user}","gists_url":"https://api.github.com/users/angieskazka/gists{/gist_id}","starred_url":"https://api.github.com/users/angieskazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angieskazka/subscriptions","organizations_url":"https://api.github.com/users/angieskazka/orgs","repos_url":"https://api.github.com/users/angieskazka/repos","events_url":"https://api.github.com/users/angieskazka/events{/privacy}","received_events_url":"https://api.github.com/users/angieskazka/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":6,"state":"open","created_at":"2016-04-29T01:40:09Z","updated_at":"2016-05-10T22:16:13Z","due_on":"2016-05-17T22:00:00Z","closed_at":null},"comments":0,"created_at":"2016-05-09T09:04:11Z","updated_at":"2016-05-10T22:16:13Z","closed_at":"2016-05-10T22:16:13Z","body":"1x resize --> bubblechart-component.js resize --> zoom.on --> redraw bubbles\r\n2x resize --> bubblesize.js --> brush.on --> setModel(extent) --> bubblechart-component.js --> redraw (size only)\r\n\r\nwe don't want many redraws, we just need one (the first one)\r\nthe issue is solved if you don't call brush event in bubblesize.js and instead just update labels, arcs and slider\r\n\r\n![image](https://cloud.githubusercontent.com/assets/3648190/15108179/c7331398-15d4-11e6-897e-dca7860d548c.png)\r\n\r\nbut then label leash breaks when resizing (it doesn't update on profile boundaries)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/3648190/15108254/33401694-15d5-11e6-9ac3-b897409aad5a.png)\r\n\r\nalso, forcing setModel \"size.extent\" on resize is a bad practice because extent in fact doesn't change. i've seen the same pattern in label size slider. instead it should be: \r\nresize --> sliders update view without modifying the model\r\nresize --> bubble chart updates self as it likes to --> calls label update with new parameters --> labels get updated"}}