unregister allows you to specify a function. remove does not.
I can't believe no one caught this before... (Fixes #192.) git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1319 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -197,8 +197,8 @@ OpenLayers.Control.PanZoomBar.prototype =
|
|||||||
if (!Event.isLeftClick(evt)) return;
|
if (!Event.isLeftClick(evt)) return;
|
||||||
if (this.zoomStart) {
|
if (this.zoomStart) {
|
||||||
this.div.style.cursor="default";
|
this.div.style.cursor="default";
|
||||||
this.map.events.remove("mousemove");
|
this.map.events.unregister("mouseup", this, this.passEventToSlider);
|
||||||
this.map.events.remove("mouseup");
|
this.map.events.unregister("mousemove", this, this.passEventToSlider);
|
||||||
var deltaY = this.zoomStart.y - evt.xy.y
|
var deltaY = this.zoomStart.y - evt.xy.y
|
||||||
this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight));
|
this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight));
|
||||||
this.moveZoomBar();
|
this.moveZoomBar();
|
||||||
|
|||||||
Reference in New Issue
Block a user