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.
This commit is contained in:
tsauerwein
2014-03-10 14:58:07 +01:00
parent b2e946794f
commit 6e2f0dce76

View File

@@ -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) {