Merge pull request #2501 from fredj/2501

bug fix to play nice with sencha touch 2.3
This commit is contained in:
Frédéric Junod
2014-08-07 16:58:19 +02:00

View File

@@ -604,7 +604,7 @@ ol.Map.prototype.getEventPixel = function(event) {
// So we ourselves compute the position of touch events.
// See https://github.com/google/closure-library/pull/323
if (goog.isDef(event.changedTouches)) {
var touch = event.changedTouches.item(0);
var touch = event.changedTouches[0];
var viewportPosition = goog.style.getClientPosition(this.viewport_);
return [
touch.clientX - viewportPosition.x,