Improve trackpad rebound behavior
This commit is contained in:
@@ -217,9 +217,12 @@ class MouseWheelZoom extends Interaction {
|
|||||||
if (this.trackpadTimeoutId_) {
|
if (this.trackpadTimeoutId_) {
|
||||||
clearTimeout(this.trackpadTimeoutId_);
|
clearTimeout(this.trackpadTimeoutId_);
|
||||||
} else {
|
} else {
|
||||||
|
if (view.getAnimating()) {
|
||||||
|
view.cancelAnimations();
|
||||||
|
}
|
||||||
view.beginInteraction();
|
view.beginInteraction();
|
||||||
}
|
}
|
||||||
this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.trackpadEventGap_);
|
this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeoutId_);
|
||||||
view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);
|
view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);
|
||||||
this.startTime_ = now;
|
this.startTime_ = now;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user