You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some property whose value can be updated; when it is, a redraw is necessary, so the setter will call m.redraw()
Sometimes, updating this property is just part of a longer chain of updates
Most of the times, this works just fine, but sometimes the optimization where redraw is synchronous kicks in while the state is not consistent yet, resulting if a flash of incorrect content.
model.property1=value1;// if redraw() is synchronous, the second update will be missed for a framemodel.property2=value2;// now redraw() will be delayed for sure so improper content displays
To solve this problem for my project I created my own synchronization helpers (I don't call m.redraw but some helper that will not trigger an actual redraw if an operation is in progress, and will instead wait for this operation to complete before triggering a redraw to make sure the state is never inconsistent).
I think this should be part of the built-in library, the current redraw mechanics are kinda annoying, especially if you have to work with promises obtained from the DOM APIs.
Any opinion?
The text was updated successfully, but these errors were encountered:
Here is a problem I have:
To solve this problem for my project I created my own synchronization helpers (I don't call m.redraw but some helper that will not trigger an actual redraw if an operation is in progress, and will instead wait for this operation to complete before triggering a redraw to make sure the state is never inconsistent).
I think this should be part of the built-in library, the current redraw mechanics are kinda annoying, especially if you have to work with promises obtained from the DOM APIs.
Any opinion?
The text was updated successfully, but these errors were encountered: