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();