mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-29 22:21:43 +03:00
Updated MouseTracker's hasGestureHandlers and hasScrollHandler to be getters
This commit is contained in:
parent
9527f15f52
commit
641e085259
@ -386,10 +386,9 @@
|
||||
|
||||
/**
|
||||
* Do we currently have any assigned gesture handlers.
|
||||
* @function
|
||||
* @returns {Boolean} Do we currently have any assigned gesture handlers.
|
||||
*/
|
||||
hasGestureHandlers: function () {
|
||||
get hasGestureHandlers() {
|
||||
return !!(this.pressHandler ||
|
||||
this.nonPrimaryPressHandler ||
|
||||
this.releaseHandler ||
|
||||
@ -403,10 +402,9 @@
|
||||
|
||||
/**
|
||||
* Do we currently have a scroll handler.
|
||||
* @function
|
||||
* @returns {Boolean} Do we currently have a scroll handler.
|
||||
*/
|
||||
hasScrollHandler: function () {
|
||||
get hasScrollHandler() {
|
||||
return !!this.scrollHandler;
|
||||
},
|
||||
|
||||
@ -2855,7 +2853,7 @@
|
||||
eventInfo.isStoppable = true;
|
||||
eventInfo.isCancelable = true;
|
||||
eventInfo.preventDefault = false;
|
||||
eventInfo.preventGesture = !tracker.hasGestureHandlers();
|
||||
eventInfo.preventGesture = !tracker.hasGestureHandlers;
|
||||
eventInfo.stopPropagation = false;
|
||||
break;
|
||||
case 'pointerover':
|
||||
@ -2873,22 +2871,22 @@
|
||||
case 'pointerdown':
|
||||
eventInfo.isStoppable = true;
|
||||
eventInfo.isCancelable = true;
|
||||
eventInfo.preventDefault = false; // updatePointerDown() may set true (tracker.hasGestureHandlers())
|
||||
eventInfo.preventGesture = !tracker.hasGestureHandlers();
|
||||
eventInfo.preventDefault = false; // updatePointerDown() may set true (tracker.hasGestureHandlers)
|
||||
eventInfo.preventGesture = !tracker.hasGestureHandlers;
|
||||
eventInfo.stopPropagation = false;
|
||||
break;
|
||||
case 'pointerup':
|
||||
eventInfo.isStoppable = true;
|
||||
eventInfo.isCancelable = true;
|
||||
eventInfo.preventDefault = false;
|
||||
eventInfo.preventGesture = !tracker.hasGestureHandlers();
|
||||
eventInfo.preventGesture = !tracker.hasGestureHandlers;
|
||||
eventInfo.stopPropagation = false;
|
||||
break;
|
||||
case 'wheel':
|
||||
eventInfo.isStoppable = true;
|
||||
eventInfo.isCancelable = true;
|
||||
eventInfo.preventDefault = false; // handleWheelEvent() may set true
|
||||
eventInfo.preventGesture = !tracker.hasScrollHandler();
|
||||
eventInfo.preventGesture = !tracker.hasScrollHandler;
|
||||
eventInfo.stopPropagation = false;
|
||||
break;
|
||||
case 'gotpointercapture':
|
||||
|
Loading…
x
Reference in New Issue
Block a user