Browse Source

Disable the default handling of the pinch event when handling it. (#3334)

* Disable the default handling of the pinch event when handling it.

* Also disable the touch events to prevent double tap zooming.
revert-3409-performance
Steven Jones 7 years ago
committed by Yotam Berkowitz
parent
commit
35d27c6aed
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      lib/timeline/Range.js

+ 5
- 0
lib/timeline/Range.js View File

@ -664,6 +664,8 @@ Range.prototype._onTouch = function (event) { // eslint-disable-line no-unused-
this.props.touch.center = null;
this.scaleOffset = 0;
this.deltaDifference = 0;
// Disable the browser default handling of this event.
util.preventDefault(event);
};
/**
@ -675,6 +677,9 @@ Range.prototype._onPinch = function (event) {
// only allow zooming when configured as zoomable and moveable
if (!(this.options.zoomable && this.options.moveable)) return;
// Disable the browser default handling of this event.
util.preventDefault(event);
this.props.touch.allowDragging = false;
if (!this.props.touch.center) {

Loading…
Cancel
Save