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
We call mark_dirty after setting up our app to initialize the view, however because the image hasn't loaded yet, it's not displayed. Because we're not calling rocky.mark_dirty() on a regular basis, the image is never redrawn.
The text was updated successfully, but these errors were encountered:
Does bmp.onload = function(){rocky.mark_dirty();} ? I think we should finally implement the more user-friendly solution and always call .mark_dirty() after a resource was loaded.
I didn't realize created bitmaps had an onload property - this works great. We should make sure this is properly documented.
I'm not sure we would want to always call .mark_dirty() after loading a resource.. you might load a series of resources at app start, and not use them until later.
The following snippet demonstrates the problem:
We call
mark_dirty
after setting up our app to initialize the view, however because the image hasn't loaded yet, it's not displayed. Because we're not callingrocky.mark_dirty()
on a regular basis, the image is never redrawn.The text was updated successfully, but these errors were encountered: