From 44819f20e804221279f1289e59d58998cd250221 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 21 Aug 2006 19:18:47 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Control/PanZoomBar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index 730eefdaa6..33459aade3 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -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();