Trigger feature related events with feature information and layer related events with layer information. Also adding events.on and events.un convenience methods. r=crschmidt (closes #1343)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6149 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -47,12 +47,15 @@ OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, {
|
||||
}
|
||||
this.handler = null;
|
||||
|
||||
this.map.events.unregister( "click", this, this.defaultClick );
|
||||
this.map.events.unregister( "dblclick", this, this.defaultDblClick );
|
||||
this.map.events.unregister( "mousedown", this, this.defaultMouseDown );
|
||||
this.map.events.unregister( "mouseup", this, this.defaultMouseUp );
|
||||
this.map.events.unregister( "mousemove", this, this.defaultMouseMove );
|
||||
this.map.events.unregister( "mouseout", this, this.defaultMouseOut );
|
||||
this.map.events.un({
|
||||
"click": this.defaultClick,
|
||||
"dblclick": this.defaultDblClick,
|
||||
"mousedown": this.defaultMouseDown,
|
||||
"mouseup": this.defaultMouseUp,
|
||||
"mousemove": this.defaultMouseMove,
|
||||
"mouseout": this.defaultMouseOut,
|
||||
scope: this
|
||||
});
|
||||
|
||||
//unregister mousewheel events specifically on the window and document
|
||||
OpenLayers.Event.stopObserving(window, "DOMMouseScroll",
|
||||
@@ -70,12 +73,15 @@ OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, {
|
||||
* Method: draw
|
||||
*/
|
||||
draw: function() {
|
||||
this.map.events.register( "click", this, this.defaultClick );
|
||||
this.map.events.register( "dblclick", this, this.defaultDblClick );
|
||||
this.map.events.register( "mousedown", this, this.defaultMouseDown );
|
||||
this.map.events.register( "mouseup", this, this.defaultMouseUp );
|
||||
this.map.events.register( "mousemove", this, this.defaultMouseMove );
|
||||
this.map.events.register( "mouseout", this, this.defaultMouseOut );
|
||||
this.map.events.on({
|
||||
"click": this.defaultClick,
|
||||
"dblclick": this.defaultDblClick,
|
||||
"mousedown": this.defaultMouseDown,
|
||||
"mouseup": this.defaultMouseUp,
|
||||
"mousemove": this.defaultMouseMove,
|
||||
"mouseout": this.defaultMouseOut,
|
||||
scope: this
|
||||
});
|
||||
|
||||
this.registerWheelEvents();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user