[OpenLayers-Trac] [OpenLayers] #3388: Dragging along edge of a
restricted extent is sticky
OpenLayers
trac-20090302 at openlayers.org
Mon Jun 27 17:18:43 EDT 2011
#3388: Dragging along edge of a restricted extent is sticky
----------------------+-----------------------------------------------------
Reporter: jkfranci | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.11 Release
Component: Map | Version: 2.11 RC1
Keywords: | State:
----------------------+-----------------------------------------------------
Across all chrome/FF/and likely all browsers. This bug is new for 2.11rc1
and is not in 2.10.
'''Problem'''
The Map moveByPx code invalidates a drag when the restricted extent is
violated, unlike the moveTo code which corrects for the restricted extent
by nudging the lonlat back inside the restricted extent. This causes
"sticky" edges when dragging along a restricted extent as many of these
events are cancelled, or if the extent is narrower than the viewport in
any way, a frozen map. This can be observed at the demo:
'''Reproducing the error'''
[http://openlayers.org/dev/examples/restricted-extent.html]
Zoom in, and then move up to the top edge of the restricted extent. Then
drag down in a 45 degree angle. Instead of capturing the side to side
motion and locking the vertical motion, the map stutters or does not move
at all.
'''Possible Solution'''
The solution would be to copy the restricted extent code for correcting
the lonlat from moveTo into moveByPx in Map.js. This correction code needs
to be in both functions or else you cannot drag a restricted extent that
is wider than the viewport, but shorter, or vice versa.
--
Ticket URL: <http://trac.openlayers.org/ticket/3388>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list