diff --git a/src/viewer.js b/src/viewer.js index cf28f7b7..e3bc1eec 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2728,8 +2728,8 @@ function onCanvasKeyPress( event ) { var canvasKeyPressEventArgs = { originalEvent: event.originalEvent, preventDefaultAction: false, - preventVerticalPan: event.preventVerticalPan, - preventHorizontalPan: event.preventHorizontalPan + preventVerticalPan: !this.panVertical, + preventHorizontalPan: !this.panHorizontal }; // This event is documented in onCanvasKeyDown @@ -2779,8 +2779,8 @@ function onCanvasKeyPress( event ) { break; case 97://a if (!canvasKeyPressEventArgs.preventHorizontalPan) { - this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(-40, 0))); - this.viewport.applyConstraints(); + this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(-40, 0))); + this.viewport.applyConstraints(); } event.preventDefault = true; break; diff --git a/test/demo/basic.html b/test/demo/basic.html index af1bfb0d..f18a40e9 100644 --- a/test/demo/basic.html +++ b/test/demo/basic.html @@ -25,9 +25,7 @@ id: "contentDiv", prefixUrl: "../../build/openseadragon/images/", tileSources: "../data/testpattern.dzi", - showNavigator:true, - panVertical: false, - panHorizontal: true + showNavigator:true });