[OpenLayers-Commits] r11921 - in sandbox/elemoine/3272:
lib/OpenLayers/Handler tests/Handler
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Apr 28 02:04:11 EDT 2011
Author: erilem
Date: 2011-04-27 23:04:10 -0700 (Wed, 27 Apr 2011)
New Revision: 11921
Modified:
sandbox/elemoine/3272/lib/OpenLayers/Handler/Path.js
sandbox/elemoine/3272/tests/Handler/Path.html
sandbox/elemoine/3272/tests/Handler/Polygon.html
Log:
path handler - finishGeometry will reset mouseDown
Modified: sandbox/elemoine/3272/lib/OpenLayers/Handler/Path.js
===================================================================
--- sandbox/elemoine/3272/lib/OpenLayers/Handler/Path.js 2011-04-28 06:03:59 UTC (rev 11920)
+++ sandbox/elemoine/3272/lib/OpenLayers/Handler/Path.js 2011-04-28 06:04:10 UTC (rev 11921)
@@ -255,8 +255,6 @@
this.finishGeometry();
window.clearTimeout(this.timerId);
this.timerId = null;
- // set mouseDown to false for up() to do nothing
- this.mouseDown = false;
return false;
} else {
if (this.timerId) {
Modified: sandbox/elemoine/3272/tests/Handler/Path.html
===================================================================
--- sandbox/elemoine/3272/tests/Handler/Path.html 2011-04-28 06:03:59 UTC (rev 11920)
+++ sandbox/elemoine/3272/tests/Handler/Path.html 2011-04-28 06:04:10 UTC (rev 11921)
@@ -817,7 +817,7 @@
// a) tap
// c) doubletap
function test_touch_sequence1(t) {
- t.plan(17);
+ t.plan(19);
// set up
@@ -886,6 +886,10 @@
new OpenLayers.Geometry.Point(-149, 75), // (1, 0)
new OpenLayers.Geometry.Point(-140, 65) // (10, 10)
]), "[touchstart] final geometry is correct");
+ log = null;
+ ret = handler.touchend({});
+ t.ok(ret, '[touchend] event propagates');
+ t.eq(log, null, '[touchend] feature not finalized or modified');
// tear down
@@ -896,7 +900,7 @@
// b) tap-move
// c) doubletap
function test_touch_sequence2(t) {
- t.plan(23);
+ t.plan(25);
// set up
@@ -977,6 +981,10 @@
new OpenLayers.Geometry.Point(-149, 75), // (1, 0)
new OpenLayers.Geometry.Point(-140, 65) // (10, 10)
]), "[touchstart] final geometry is correct");
+ log = null;
+ ret = handler.touchend({});
+ t.ok(ret, '[touchend] event propagates');
+ t.eq(log, null, '[touchend] feature not finalized or modified');
// tear down
Modified: sandbox/elemoine/3272/tests/Handler/Polygon.html
===================================================================
--- sandbox/elemoine/3272/tests/Handler/Polygon.html 2011-04-28 06:03:59 UTC (rev 11920)
+++ sandbox/elemoine/3272/tests/Handler/Polygon.html 2011-04-28 06:04:10 UTC (rev 11921)
@@ -906,7 +906,7 @@
// b) tap
// c) doubletap
function test_touch_sequence1(t) {
- t.plan(24);
+ t.plan(26);
// set up
@@ -992,6 +992,10 @@
new OpenLayers.Geometry.Point(-140, 65) // (10, 10)
])
]), "[touchstart] geometry is correct");
+ log = null;
+ ret = handler.touchend({});
+ t.ok(ret, '[touchend] event propagates');
+ t.eq(log, null, '[touchend] feature not finalized or modified');
// tear down
@@ -1003,7 +1007,7 @@
// c) tap
// d) doubletap
function test_touch_sequence2(t) {
- t.plan(30);
+ t.plan(32);
// set up
@@ -1101,6 +1105,10 @@
new OpenLayers.Geometry.Point(-140, 65) // (10, 10)
])
]), "[touchstart] geometry is correct");
+ log = null;
+ ret = handler.touchend({});
+ t.ok(ret, '[touchend] event propagates');
+ t.eq(log, null, '[touchend] feature not finalized or modified');
// tear down
More information about the Commits
mailing list