From 9ebf950e3b0c329b660838849eafca5a3a84e855 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Mon, 16 Jul 2007 19:07:01 +0000 Subject: [PATCH] #651: PanZoom should not block mouseup. Reviewed by tschaub. git-svn-id: http://svn.openlayers.org/trunk/openlayers@3766 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Control/PanZoom.js | 2 -- tests/Control/test_PanZoom.html | 14 +++++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/OpenLayers/Control/PanZoom.js b/lib/OpenLayers/Control/PanZoom.js index 0a7b551ae1..1fcdb9fe1b 100644 --- a/lib/OpenLayers/Control/PanZoom.js +++ b/lib/OpenLayers/Control/PanZoom.js @@ -117,8 +117,6 @@ OpenLayers.Control.PanZoom.prototype = OpenLayers.Event.observe(btn, "mousedown", this.buttonDown.bindAsEventListener(btn)); - OpenLayers.Event.observe(btn, "mouseup", - this.doubleClick.bindAsEventListener(btn)); OpenLayers.Event.observe(btn, "dblclick", this.doubleClick.bindAsEventListener(btn)); OpenLayers.Event.observe(btn, "click", diff --git a/tests/Control/test_PanZoom.html b/tests/Control/test_PanZoom.html index b889a8c2fd..74b507b0fe 100644 --- a/tests/Control/test_PanZoom.html +++ b/tests/Control/test_PanZoom.html @@ -62,7 +62,7 @@ simulateClick(wnd, wnd.control.buttons[0]); t.ok( wnd.mapper.getCenter().lat > wnd.centerLL.lat, "Pan up works correctly" ); t.ok(!flag.mousedown, "mousedown does not get to the map"); - t.ok(!flag.mouseup, "mouseup does not get to the map"); + t.ok(flag.mouseup, "mouseup does get to the map"); t.ok(!flag.click, "click does not get to the map"); t.ok(!flag.dblclick, "dblclick does not get to the map"); resetFlags(); @@ -70,7 +70,7 @@ simulateClick(wnd, wnd.control.buttons[1]); t.ok( wnd.mapper.getCenter().lon < wnd.centerLL.lon, "Pan left works correctly" ); t.ok(!flag.mousedown, "mousedown does not get to the map"); - t.ok(!flag.mouseup, "mouseup does not get to the map"); + t.ok(flag.mouseup, "mouseup does get to the map"); t.ok(!flag.click, "click does not get to the map"); t.ok(!flag.dblclick, "dblclick does not get to the map"); resetFlags(); @@ -78,7 +78,7 @@ simulateClick(wnd, wnd.control.buttons[2]); t.ok( wnd.mapper.getCenter().lon == wnd.centerLL.lon, "Pan right works correctly" ); t.ok(!flag.mousedown, "mousedown does not get to the map"); - t.ok(!flag.mouseup, "mouseup does not get to the map"); + t.ok(flag.mouseup, "mouseup does get to the map"); t.ok(!flag.click, "click does not get to the map"); t.ok(!flag.dblclick, "dblclick does not get to the map"); resetFlags(); @@ -86,7 +86,7 @@ simulateClick(wnd, wnd.control.buttons[3]); t.ok( wnd.mapper.getCenter().lat == wnd.centerLL.lat, "Pan down works correctly" ); t.ok(!flag.mousedown, "mousedown does not get to the map"); - t.ok(!flag.mouseup, "mouseup does not get to the map"); + t.ok(flag.mouseup, "mouseup does get to the map"); t.ok(!flag.click, "click does not get to the map"); t.ok(!flag.dblclick, "dblclick does not get to the map"); resetFlags(); @@ -94,7 +94,7 @@ simulateClick(wnd, wnd.control.buttons[4]); t.eq( wnd.mapper.getZoom(), 6, "zoomin works correctly" ); t.ok(!flag.mousedown, "mousedown does not get to the map"); - t.ok(!flag.mouseup, "mouseup does not get to the map"); + t.ok(flag.mouseup, "mouseup does get to the map"); t.ok(!flag.click, "click does not get to the map"); t.ok(!flag.dblclick, "dblclick does not get to the map"); resetFlags(); @@ -102,7 +102,7 @@ simulateClick(wnd, wnd.control.buttons[6]); t.eq( wnd.mapper.getZoom(), 5, "zoomout works correctly" ); t.ok(!flag.mousedown, "mousedown does not get to the map"); - t.ok(!flag.mouseup, "mouseup does not get to the map"); + t.ok(flag.mouseup, "mouseup does get to the map"); t.ok(!flag.click, "click does not get to the map"); t.ok(!flag.dblclick, "dblclick does not get to the map"); resetFlags(); @@ -110,7 +110,7 @@ simulateClick(wnd, wnd.control.buttons[5]); t.eq( wnd.mapper.getZoom(), 2, "zoomworld works correctly" ); t.ok(!flag.mousedown, "mousedown does not get to the map"); - t.ok(!flag.mouseup, "mouseup does not get to the map"); + t.ok(flag.mouseup, "mouseup does get to the map"); t.ok(!flag.click, "click does not get to the map"); t.ok(!flag.dblclick, "dblclick does not get to the map"); resetFlags();