mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-22 09:43:14 +03:00
Merge pull request #2649 from Seafret/master
Fixed issue with MouseTracker where hasGestureHandlers and hasScrollHandler values were not getting updated upon dynamically adding/removing handlers.
This commit is contained in:
commit
3aaa8fa721
@ -277,13 +277,6 @@
|
||||
sentDragEvent: false
|
||||
};
|
||||
|
||||
this.hasGestureHandlers = !!( this.pressHandler || this.nonPrimaryPressHandler ||
|
||||
this.releaseHandler || this.nonPrimaryReleaseHandler ||
|
||||
this.clickHandler || this.dblClickHandler ||
|
||||
this.dragHandler || this.dragEndHandler ||
|
||||
this.pinchHandler );
|
||||
this.hasScrollHandler = !!this.scrollHandler;
|
||||
|
||||
if ( $.MouseTracker.havePointerEvents ) {
|
||||
$.setElementPointerEvents( this.element, 'auto' );
|
||||
}
|
||||
@ -391,6 +384,30 @@
|
||||
return count;
|
||||
},
|
||||
|
||||
/**
|
||||
* Do we currently have any assigned gesture handlers.
|
||||
* @returns {Boolean} Do we currently have any assigned gesture handlers.
|
||||
*/
|
||||
get hasGestureHandlers() {
|
||||
return !!(this.pressHandler ||
|
||||
this.nonPrimaryPressHandler ||
|
||||
this.releaseHandler ||
|
||||
this.nonPrimaryReleaseHandler ||
|
||||
this.clickHandler ||
|
||||
this.dblClickHandler ||
|
||||
this.dragHandler ||
|
||||
this.dragEndHandler ||
|
||||
this.pinchHandler);
|
||||
},
|
||||
|
||||
/**
|
||||
* Do we currently have a scroll handler.
|
||||
* @returns {Boolean} Do we currently have a scroll handler.
|
||||
*/
|
||||
get hasScrollHandler() {
|
||||
return !!this.scrollHandler;
|
||||
},
|
||||
|
||||
/**
|
||||
* Implement or assign implementation to these handlers during or after
|
||||
* calling the constructor.
|
||||
|
Loading…
x
Reference in New Issue
Block a user