Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of forced reflows inside of the animation loop when calculating size. #19

Closed
trusktr opened this issue Apr 18, 2016 · 2 comments

Comments

@trusktr
Copy link
Member

trusktr commented Apr 18, 2016

getComputedStyle in Sizeable#actualSize is what causes it. Instead, let's listen to size changes on the root Scene, then we can calculate proportional sizes using plain math without hitting the DOM's getComputedStyle method. This is what we need to do anyways because when rendering to WebGL only (f.e. if DOM rendering were turned off when that option is available in the future), then there may be no DOM elements from which to call getComputedStyle on anyways.

@trusktr trusktr changed the title Get rid of forced reflows inside of animation loop Get rid of forced reflows inside of the animation loop when calculating size. Jul 23, 2016
@trusktr
Copy link
Member Author

trusktr commented Sep 13, 2016

This will be solved along with #56

@trusktr trusktr added this to the Initial API, then time for demos. milestone Oct 9, 2016
trusktr added a commit that referenced this issue Oct 11, 2016
to Observable), then they re-render if necessary (f.e. if proportionally
sized, etc). Proportional sizing is handled by the library rather than
by percentage based CSS sizing. This sets us up for WebGL sizing in the
future...

closes #56 #19
@trusktr
Copy link
Member Author

trusktr commented Oct 11, 2016

closed in b8672eb

@trusktr trusktr closed this as completed Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant