_destroyEventListeners() { this._gestureDetector.off('drag', this._boundOnDrag); this._gestureDetector.off('dragstart', this._boundOnDragStart); this._gestureDetector.off('dragend', this._boundOnDragEnd); this._gestureDetector.dispose(); this._gestureDetector = null; this._scrollElement.parentElement.removeEventListener('scroll', this._boundOnScroll, false); }
_updateSwipeable() { if (this._gestureDetector) { if (this.swipeable) { this._gestureDetector.on('drag dragleft dragright dragup dragdown swipe swipeleft swiperight swipeup swipedown', this._boundOnDrag); this._gestureDetector.on('dragend', this._boundOnDragEnd); } else { this._gestureDetector.off('drag dragleft dragright dragup dragdown swipe swipeleft swiperight swipeup swipedown', this._boundOnDrag); this._gestureDetector.off('dragend', this._boundOnDragEnd); } } }