[OpenLayers-Commits] r11075 - sandbox/elemoine/draw-feature/tests/Handler

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Feb 10 05:45:02 EST 2011


Author: erilem
Date: 2011-02-10 02:45:02 -0800 (Thu, 10 Feb 2011)
New Revision: 11075

Modified:
   sandbox/elemoine/draw-feature/tests/Handler/Point.html
Log:
Point Handler - test that double clicks do not add points

Modified: sandbox/elemoine/draw-feature/tests/Handler/Point.html
===================================================================
--- sandbox/elemoine/draw-feature/tests/Handler/Point.html	2011-02-10 10:08:15 UTC (rev 11074)
+++ sandbox/elemoine/draw-feature/tests/Handler/Point.html	2011-02-10 10:45:02 UTC (rev 11075)
@@ -142,7 +142,7 @@
     }
     
     function test_callbacks(t) {
-        t.plan(24);
+        t.plan(25);
         var map = new OpenLayers.Map("map", {
             resolutions: [1]
         });
@@ -219,6 +219,10 @@
         t.eq(log[5].type, "create", "[mouseup] create called");
         t.geom_eq(log[5].args[0], new OpenLayers.Geometry.Point(-200, 125),
                   "[activate] correct point");
+        // mouse up on same pixel
+        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(2, 0)});
+        t.eq(log.length, 6, "[mouseup] not called back");
+        // cancel
         handler.cancel();
         t.eq(log.length, 7, "[cancel] called back");
         t.eq(log[6].type, "cancel", "[cancel] canced called");



More information about the Commits mailing list