[OpenLayers-Trac] Re: [OpenLayers] #2941:
OpenLayers.Control.Navigation with
documentDrag enabled removes all document events.
OpenLayers
trac-20090302 at openlayers.org
Sat Nov 20 19:34:48 EST 2010
#2941: OpenLayers.Control.Navigation with documentDrag enabled removes all
document events.
--------------------------+-------------------------------------------------
Reporter: mgleahy | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.11 Release
Component: Handler.Drag | Version: 2.10
Keywords: | State:
--------------------------+-------------------------------------------------
Comment(by mgleahy):
From your note, were you suggesting something like:
OpenLayers.Event.observe(document,'mousemove',this.mousemove);
then later:
OpenLayers.Event.stopObserving(document,'mousemove',this.mousemove);
If so, I'm not having success experimenting with that approach at the
moment. Is it different enough from from the Events.on() and Events.un()
functions for registering/unregistering the event functions to have a
significant impact? How would you recommend using the
observe/stopObserving approach, relative to the changes in the patches
I've posted?
I'll attach a new patch that creates the Events object in the initialize
function as you suggest, which accomplishes more or less the same thing,
but creates the Events object before it is needed, instead of at the time
that the user first leaves the map extent (as Drag.js was originally
written).
--
Ticket URL: <http://trac.openlayers.org/ticket/2941#comment:5>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list