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

View File

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