[OpenLayers-Trac] [OpenLayers] #933: Animated transition between views
OpenLayers
trac at openlayers.org
Thu Mar 6 15:03:39 EST 2008
#933: Animated transition between views
------------------------------+---------------------------------------------
Reporter: openlayers | Owner: pspencer
Type: feature | Status: new
Priority: minor | Milestone: 2.6 Release
Component: general | Version: SVN
Resolution: | Keywords: animated transition time
State: Needs More Work |
------------------------------+---------------------------------------------
Comment (by tschaub):
Ok, I think this is in good shape. A couple more changes (and way too
many hours debugging):
1. The ratio != 1 bit was not a good check for "resolutions changed" or
"zoomed." Imagine a scenario where you zoom in (ratio == 2) and then you
zoom back out (ratio == 1). So, with the ratio != 1 check the buffer
tiles were not properly resized and placed when you returned to the
original resolution (ratio == 1). By giving tiles a lastRatio property
(could do this whole thing in a control with it's own grid to avoid
extending tiles so much), we can check if a change in resolution actually
occurred (ratio != lastRatio) and resize/reposition accordingly.
1. There were a number of hide/show sequences that didn't appear to be
necessary (could have been efforts to get rid of the flicker?)
1. The flicker looks to be the same issue we just had with SVG flicker
([http://trac.openlayers.org/ticket/1390#comment:10 my take]). It looks
like Firefox does not reflow in a predictable way when in a sequence of
code triggered by a browser event. In this case, image load triggers our
tile "loaded" event (or layer "loaded") and we try to show the main tile
before hiding the buffer tile. This sequence is not always respected.
The solutions are to continue execution in a separate thread
(window.setTimeout(func, 0)) or to set some other dom property (without
actually changing it). As with #1390, I think this is best done with the
simple property reset hack. This means that tile.show gets a check for
gecko and does the hack to force a reflow before the buffer tile is
adjusted.
I updated the example and played around with it for a bit. All looks good
on Firefox.
The Tween tests (2 of them) are failing. I'm not going to take that on
right now.
If someone fixes the Tween tests and confirms that this performs as
expected, I think it's good to go.
--
Ticket URL: <http://trac.openlayers.org/ticket/933#comment:17>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list