{"action":"created","issue":{"url":"https://api.github.com/repos/Gapminder/vizabi/issues/75","labels_url":"https://api.github.com/repos/Gapminder/vizabi/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/Gapminder/vizabi/issues/75/comments","events_url":"https://api.github.com/repos/Gapminder/vizabi/issues/75/events","html_url":"https://github.com/Gapminder/vizabi/issues/75","id":60260498,"number":75,"title":"Resize can be more economical","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":[],"state":"open","locked":false,"assignee":{"login":"arthurcamara1","id":3584238,"avatar_url":"https://avatars.githubusercontent.com/u/3584238?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurcamara1","html_url":"https://github.com/arthurcamara1","followers_url":"https://api.github.com/users/arthurcamara1/followers","following_url":"https://api.github.com/users/arthurcamara1/following{/other_user}","gists_url":"https://api.github.com/users/arthurcamara1/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurcamara1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurcamara1/subscriptions","organizations_url":"https://api.github.com/users/arthurcamara1/orgs","repos_url":"https://api.github.com/users/arthurcamara1/repos","events_url":"https://api.github.com/users/arthurcamara1/events{/privacy}","received_events_url":"https://api.github.com/users/arthurcamara1/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-03-08T15:09:47Z","updated_at":"2015-03-08T22:47:31Z","closed_at":null,"body":"We ask components to resize whenever page is resized. However it's not necessary, we should resize components only if a tool container actually changes its size. \n\nMinor issue. Hans says in reality resizing happens extremely rare. Usually the initial size stays throughout the entire session"},"comment":{"url":"https://api.github.com/repos/Gapminder/vizabi/issues/comments/77779983","html_url":"https://github.com/Gapminder/vizabi/issues/75#issuecomment-77779983","issue_url":"https://api.github.com/repos/Gapminder/vizabi/issues/75","id":77779983,"user":{"login":"arthurcamara1","id":3584238,"avatar_url":"https://avatars.githubusercontent.com/u/3584238?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurcamara1","html_url":"https://github.com/arthurcamara1","followers_url":"https://api.github.com/users/arthurcamara1/followers","following_url":"https://api.github.com/users/arthurcamara1/following{/other_user}","gists_url":"https://api.github.com/users/arthurcamara1/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurcamara1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurcamara1/subscriptions","organizations_url":"https://api.github.com/users/arthurcamara1/orgs","repos_url":"https://api.github.com/users/arthurcamara1/repos","events_url":"https://api.github.com/users/arthurcamara1/events{/privacy}","received_events_url":"https://api.github.com/users/arthurcamara1/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T22:47:31Z","updated_at":"2015-03-08T22:47:31Z","body":"> We ask components to resize whenever page is resized.\r\n\r\nNot really. [We only ask `layout` to resize](https://github.com/Gapminder/vizabi/blob/develop/src/base/layout.js#L44) and, in our case, **only tools** have an instance of `base/layout`, which means they are the ones in control.\r\n\r\nBut you're right that it can be improved. The solution is for `base/layout` to trigger only if REALLY changes the size of the container, and not simply at window resize. In that case it is a minor issue because 99% of times that the browser changes size, it's because the container actually needs to resize. 1% is the corner case of us resizing the preview page, but even in that case resizing doesn't pose major threat. But I'll optimize it :)\r\n\r\nAnd it's not correct to assume resizing is extremely rare. Hans might be referring to presentations only. However, one of the **main goals** of Vizabi is being portable and mobile friendly. And well, tablets and phones need resize all the time: landscape, portrait, landscape again... There you go, 3 resizes in 1 session."}}