mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Added setMouseNavEnabled() and isMouseNavEnabled() method overrides to Navigator (#572)
This commit is contained in:
parent
2bd105042a
commit
198d4de0e6
@ -20,6 +20,7 @@ OPENSEADRAGON CHANGELOG
|
||||
* Requesting keyboard focus when viewer is clicked (#537)
|
||||
* Arrow key navigation fixed across platforms (#565)
|
||||
* Removed textarea element from viewer DOM. Viewer.canvas now handles keyboard navigation (#569)
|
||||
* Added setMouseNavEnabled() and isMouseNavEnabled() method overrides to Navigator (#572)
|
||||
|
||||
1.2.0:
|
||||
|
||||
|
@ -229,6 +229,36 @@ $.Navigator = function( options ){
|
||||
|
||||
$.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /** @lends OpenSeadragon.Navigator.prototype */{
|
||||
|
||||
/**
|
||||
* @function
|
||||
* @return {Boolean}
|
||||
*/
|
||||
isMouseNavEnabled: function () {
|
||||
return this.element.innerTracker.isTracking();
|
||||
},
|
||||
|
||||
/**
|
||||
* @function
|
||||
* @param {Boolean} enabled - true to enable, false to disable
|
||||
* @return {OpenSeadragon.Navigator} Chainable.
|
||||
* @fires OpenSeadragon.Navigator.event:mouse-enabled
|
||||
*/
|
||||
setMouseNavEnabled: function( enabled ){
|
||||
this.element.innerTracker.setTracking( enabled );
|
||||
/**
|
||||
* Raised when mouse/touch navigation is enabled or disabled (see {@link OpenSeadragon.Navigator#setMouseNavEnabled}).
|
||||
*
|
||||
* @event mouse-enabled
|
||||
* @memberof OpenSeadragon.Navigator
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Navigator} eventSource - A reference to the Navigator which raised the event.
|
||||
* @property {Boolean} enabled
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
this.raiseEvent( 'mouse-enabled', { enabled: enabled } );
|
||||
return this;
|
||||
},
|
||||
|
||||
/**
|
||||
* Used to notify the navigator when its size has changed.
|
||||
* Especially useful when {@link OpenSeadragon.Options}.navigatorAutoResize is set to false and the navigator is resizable.
|
||||
|
Loading…
Reference in New Issue
Block a user