#651: PanZoom should not block mouseup. Reviewed by tschaub.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3766 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user