[OpenLayers-Commits] r11807 - in trunk/openlayers:
lib/OpenLayers/Handler tests/Handler
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Mar 30 16:53:50 EDT 2011
Author: tschaub
Date: 2011-03-30 13:53:46 -0700 (Wed, 30 Mar 2011)
New Revision: 11807
Modified:
trunk/openlayers/lib/OpenLayers/Handler/Click.js
trunk/openlayers/tests/Handler/Click.html
Log:
Restore click handler state in deactivate. r=erilem (closes #3217)
Modified: trunk/openlayers/lib/OpenLayers/Handler/Click.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Handler/Click.js 2011-03-30 20:52:01 UTC (rev 11806)
+++ trunk/openlayers/lib/OpenLayers/Handler/Click.js 2011-03-30 20:53:46 UTC (rev 11807)
@@ -515,6 +515,8 @@
this.clearTimer();
this.down = null;
this.first = null;
+ this.last = null;
+ this.touch = false;
deactivated = true;
}
return deactivated;
Modified: trunk/openlayers/tests/Handler/Click.html
===================================================================
--- trunk/openlayers/tests/Handler/Click.html 2011-03-30 20:52:01 UTC (rev 11806)
+++ trunk/openlayers/tests/Handler/Click.html 2011-03-30 20:53:46 UTC (rev 11807)
@@ -410,7 +410,7 @@
}
function test_Handler_Click_deactivate(t) {
- t.plan(4);
+ t.plan(6);
var control = {
map: new OpenLayers.Map('map')
};
@@ -422,6 +422,8 @@
handler.active = true;
handler.down = true;
handler.timerId = true;
+ handler.touch = true;
+ handler.last = true;
deactivated = handler.deactivate();
t.ok(deactivated,
"deactivate returns true if the handler was active already");
@@ -429,6 +431,11 @@
"deactivate sets down to null");
t.eq(handler.timerId, null,
"deactivate sets timerId to null");
+ t.eq(handler.touch, false,
+ "deactivate sets touch to false");
+ t.eq(handler.last, null,
+ "deactivate sets last to null");
+
}
function test_Handler_Click_mouseup(t) {
More information about the Commits
mailing list