mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Changelog for #1414 plus documentation tweak
This commit is contained in:
parent
6c7fcb1063
commit
c915a5966f
@ -9,6 +9,7 @@ OPENSEADRAGON CHANGELOG
|
|||||||
* The "page" event is now fired after the page index has been updated (#1330)
|
* The "page" event is now fired after the page index has been updated (#1330)
|
||||||
* Added option pixelsPerArrowPress that sets the speed of arrow keys (#1364)
|
* Added option pixelsPerArrowPress that sets the speed of arrow keys (#1364)
|
||||||
* Improved IIIF options.maxLevel calculation (#1401)
|
* Improved IIIF options.maxLevel calculation (#1401)
|
||||||
|
* Added canvas-key events, along with the ability to cancel key actions (#1414)
|
||||||
|
|
||||||
2.3.1:
|
2.3.1:
|
||||||
|
|
||||||
|
@ -2483,6 +2483,7 @@ function onCanvasKeyDown( event ) {
|
|||||||
preventVerticalPan: event.preventVerticalPan,
|
preventVerticalPan: event.preventVerticalPan,
|
||||||
preventHorizontalPan: event.preventHorizontalPan
|
preventHorizontalPan: event.preventHorizontalPan
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raised when a keyboard key is pressed and the focus is on the {@link OpenSeadragon.Viewer#canvas} element.
|
* Raised when a keyboard key is pressed and the focus is on the {@link OpenSeadragon.Viewer#canvas} element.
|
||||||
*
|
*
|
||||||
@ -2548,20 +2549,8 @@ function onCanvasKeyPress( event ) {
|
|||||||
preventVerticalPan: event.preventVerticalPan,
|
preventVerticalPan: event.preventVerticalPan,
|
||||||
preventHorizontalPan: event.preventHorizontalPan
|
preventHorizontalPan: event.preventHorizontalPan
|
||||||
};
|
};
|
||||||
/**
|
|
||||||
* Raised when a keyboard key is pressed and the focus is on the {@link OpenSeadragon.Viewer#canvas} element.
|
|
||||||
*
|
|
||||||
* @event canvas-key
|
|
||||||
* @memberof OpenSeadragon.Viewer
|
|
||||||
* @type {object}
|
|
||||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised this event.
|
|
||||||
* @property {Object} originalEvent - The original DOM event.
|
|
||||||
* @property {Boolean} preventDefaultAction - Set to true to prevent default keyboard behaviour. Default: false.
|
|
||||||
* @property {Boolean} preventVerticalPan - Set to true to prevent keyboard vertical panning. Default: false.
|
|
||||||
* @property {Boolean} preventHorizontalPan - Set to true to prevent keyboard horizontal panning. Default: false.
|
|
||||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
// This event is documented in onCanvasKeyDown
|
||||||
this.raiseEvent('canvas-key', canvasKeyPressEventArgs);
|
this.raiseEvent('canvas-key', canvasKeyPressEventArgs);
|
||||||
|
|
||||||
if ( !canvasKeyPressEventArgs.preventDefaultAction && !event.ctrl && !event.alt && !event.meta ) {
|
if ( !canvasKeyPressEventArgs.preventDefaultAction && !event.ctrl && !event.alt && !event.meta ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user