From 6e2f0dce76c322d693cfa67b26da0817a7d46c56 Mon Sep 17 00:00:00 2001 From: tsauerwein Date: Mon, 10 Mar 2014 14:58:07 +0100 Subject: [PATCH] Work on a copy of `changedTouches` On Opera Mobile 11.10 it is not possible to directly work on `changedTouches` (e.g. map fails). That is why a copy is made first. --- src/ol/pointer/touchsource.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/pointer/touchsource.js b/src/ol/pointer/touchsource.js index 63af0d7588..08197ded26 100644 --- a/src/ol/pointer/touchsource.js +++ b/src/ol/pointer/touchsource.js @@ -230,7 +230,8 @@ ol.pointer.TouchSource.prototype.touchToPointer_ = ol.pointer.TouchSource.prototype.processTouches_ = function(inEvent, inFunction) { var tl = inEvent.getBrowserEvent().changedTouches; - var pointers = goog.array.map(tl, + var touchesCopy = goog.array.clone(tl); + var pointers = goog.array.map(touchesCopy, goog.partial(this.touchToPointer_, inEvent), this); // forward touch preventDefaults goog.array.forEach(pointers, function(p) {