GlenDC/trixel

Redraw Functionallity

Closed this issue · 1 comments

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.

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.