GlenDC / trixel

An easy to use webtool, to make trixel art.
http://www.glendc.com/trixel/
MIT License
18 stars 0 forks source link

Redraw Functionallity #110

Closed GlenDC closed 9 years ago

GlenDC commented 9 years ago

Sometimes we rely on the final size of an html element. When resizing, onResize will get called and that information will be sent to recalculate the entire layout. The problem is that at that point we still don't know the final size of that element, and thus the elements that depend on such final-sizes will still use the old size.

Therefore onResize should also trigger a redraw that happens afterwards, this way we can force redraw everything with the final sizes known. And as the dimensions will still be the same, it should all be fine.

GlenDC commented 9 years ago

This hack is now in place. Once there's an API available that allows to use some kind of smart Task to get the dimensions of a auto-sized HTML node, we should use that instead.