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:
crschmidt
2006-08-21 19:18:47 +00:00
parent 6a2fa9aaf1
commit 44819f20e8

View File

@@ -197,8 +197,8 @@ OpenLayers.Control.PanZoomBar.prototype =
if (!Event.isLeftClick(evt)) return;
if (this.zoomStart) {
this.div.style.cursor="default";
this.map.events.remove("mousemove");
this.map.events.remove("mouseup");
this.map.events.unregister("mouseup", this, this.passEventToSlider);
this.map.events.unregister("mousemove", this, this.passEventToSlider);
var deltaY = this.zoomStart.y - evt.xy.y
this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight));
this.moveZoomBar();