Making buttons work
Thanks @gregersrygg for testing. With this change, zoom and other buttons (e.g. editing toolbar) work in touch mode.
This commit is contained in:
@@ -1085,8 +1085,6 @@ OpenLayers.Events = OpenLayers.Class({
|
||||
}
|
||||
|
||||
e.touches = touches.slice();
|
||||
e.changedTouches = [e];
|
||||
|
||||
handler(e);
|
||||
};
|
||||
|
||||
@@ -1122,6 +1120,11 @@ OpenLayers.Events = OpenLayers.Class({
|
||||
return;
|
||||
}
|
||||
|
||||
if (touches.length == 1 && touches[0].pageX == e.pageX &&
|
||||
touches[0].pageY == e.pageY) {
|
||||
// don't trigger event when pointer has not moved
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < touches.length; i++) {
|
||||
if (touches[i].pointerId == e.pointerId) {
|
||||
touches[i] = e;
|
||||
@@ -1130,9 +1133,6 @@ OpenLayers.Events = OpenLayers.Class({
|
||||
}
|
||||
|
||||
e.touches = touches.slice();
|
||||
e.changedTouches = [e];
|
||||
e.type = type;
|
||||
|
||||
handler(e);
|
||||
};
|
||||
|
||||
@@ -1158,11 +1158,8 @@ OpenLayers.Events = OpenLayers.Class({
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
e.touches = touches.slice();
|
||||
e.changedTouches = [e];
|
||||
e.type = type;
|
||||
|
||||
handler(e);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user