make drag handler work with touch events, p=lotsofpeople, r=tschaub (closes #2995)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11189 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-02-21 15:07:55 +00:00
parent 7a1cb00fe4
commit 07160f5385
3 changed files with 201 additions and 86 deletions

View File

@@ -45,7 +45,7 @@
}
function test_Handler_Drag_events(t) {
t.plan(25);
t.plan(40);
var map = new OpenLayers.Map('map');
var control = new OpenLayers.Control();
@@ -54,7 +54,8 @@
// list below events that should be handled (events) and those
// that should not be handled (nonevents) by the handler
var events = ["mousedown", "mouseup", "mousemove", "mouseout", "click"];
var events = ["mousedown", "mouseup", "mousemove", "mouseout", "click",
"touchstart", "touchmove", "touchend"];
var nonevents = ["dblclick", "resize", "focus", "blur"];
map.events.registerPriority = function(type, obj, func) {
var r = func();