I'm not sure what the correct behavior should be. The result of update on a layer in a non-visible viewport may depend on why it's not visible, because it will try to calculate visible chunks, etc. Right now I think viewportIsVisible means the viewport has non-zero size and overlaps the canvas.
So I think we have a couple of options:
- call
update() on layers in non-visible viewports, use CSS (visibility: hidden or whatever, I can't remember) to hide viewports. Viewports/layers can maintain "visible" chunks without actually rendering, so they're ready to render if/when they become visible again.
- don't call
update() on non-visible viewports, they will maintain the renderable objects they had when hidden (not sure if there is a race here)
Originally posted by @aganders3 in #622 (comment)
I'm not sure what the correct behavior should be. The result of
updateon a layer in a non-visible viewport may depend on why it's not visible, because it will try to calculate visible chunks, etc. Right now I thinkviewportIsVisiblemeans the viewport has non-zero size and overlaps the canvas.So I think we have a couple of options:
update()on layers in non-visible viewports, use CSS (visibility: hiddenor whatever, I can't remember) to hide viewports. Viewports/layers can maintain "visible" chunks without actually rendering, so they're ready to render if/when they become visible again.update()on non-visible viewports, they will maintain the renderable objects they had when hidden (not sure if there is a race here)Originally posted by @aganders3 in #622 (comment)