Start earlier to log points for kinetic

This commit is contained in:
tsauerwein
2014-07-18 15:54:38 +02:00
parent b4f6baa613
commit 02a2c5aceb

View File

@@ -67,10 +67,10 @@ ol.interaction.DragPan.prototype.handlePointerDrag = function(mapBrowserEvent) {
goog.asserts.assert(this.targetPointers.length >= 1);
var centroid =
ol.interaction.Pointer.centroid(this.targetPointers);
if (this.kinetic_) {
this.kinetic_.update(centroid[0], centroid[1]);
}
if (!goog.isNull(this.lastCentroid)) {
if (this.kinetic_) {
this.kinetic_.update(centroid[0], centroid[1]);
}
var deltaX = this.lastCentroid[0] - centroid[0];
var deltaY = centroid[1] - this.lastCentroid[1];
var map = mapBrowserEvent.map;