Start earlier to log points for kinetic
This commit is contained in:
@@ -67,10 +67,10 @@ ol.interaction.DragPan.prototype.handlePointerDrag = function(mapBrowserEvent) {
|
|||||||
goog.asserts.assert(this.targetPointers.length >= 1);
|
goog.asserts.assert(this.targetPointers.length >= 1);
|
||||||
var centroid =
|
var centroid =
|
||||||
ol.interaction.Pointer.centroid(this.targetPointers);
|
ol.interaction.Pointer.centroid(this.targetPointers);
|
||||||
|
if (this.kinetic_) {
|
||||||
|
this.kinetic_.update(centroid[0], centroid[1]);
|
||||||
|
}
|
||||||
if (!goog.isNull(this.lastCentroid)) {
|
if (!goog.isNull(this.lastCentroid)) {
|
||||||
if (this.kinetic_) {
|
|
||||||
this.kinetic_.update(centroid[0], centroid[1]);
|
|
||||||
}
|
|
||||||
var deltaX = this.lastCentroid[0] - centroid[0];
|
var deltaX = this.lastCentroid[0] - centroid[0];
|
||||||
var deltaY = centroid[1] - this.lastCentroid[1];
|
var deltaY = centroid[1] - this.lastCentroid[1];
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
|
|||||||
Reference in New Issue
Block a user