Updated boolean logic for preventVerticalPan and preventHorizontalPan

This commit is contained in:
Jachimike Onuoha 2021-12-06 23:33:58 -05:00
parent 5b8a22e848
commit 0a06c5b6a4
2 changed files with 5 additions and 5 deletions

View File

@ -2657,8 +2657,8 @@ function onCanvasKeyDown( event ) {
var canvasKeyDownEventArgs = {
originalEvent: event.originalEvent,
preventDefaultAction: false,
preventVerticalPan: !this.panVertical,
preventHorizontalPan: !this.panHorizontal
preventVerticalPan: event.preventVerticalPan || !this.panVertical,
preventHorizontalPan: event.preventHorizontalPan || !this.panHorizontal
};
/**
@ -2728,8 +2728,8 @@ function onCanvasKeyPress( event ) {
var canvasKeyPressEventArgs = {
originalEvent: event.originalEvent,
preventDefaultAction: false,
preventVerticalPan: !this.panVertical,
preventHorizontalPan: !this.panHorizontal
preventVerticalPan: event.preventVerticalPan || !this.panVertical,
preventHorizontalPan: event.preventHorizontalPan || !this.panHorizontal
};
// This event is documented in onCanvasKeyDown

View File

@ -21,7 +21,7 @@
<script type="text/javascript">
var viewer = OpenSeadragon({
debugMode: true,
// debugMode: true,
id: "contentDiv",
prefixUrl: "../../build/openseadragon/images/",
tileSources: "../data/testpattern.dzi",