mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Merge pull request #2069 from JachiOnuoha/JachiOnuoha-ArrowKeysBug
Fixed Arrow keys by pass panVertical/panHorizontal bug
This commit is contained in:
commit
d9494c6d7f
@ -2666,8 +2666,8 @@ function onCanvasKeyDown( event ) {
|
|||||||
var canvasKeyDownEventArgs = {
|
var canvasKeyDownEventArgs = {
|
||||||
originalEvent: event.originalEvent,
|
originalEvent: event.originalEvent,
|
||||||
preventDefaultAction: false,
|
preventDefaultAction: false,
|
||||||
preventVerticalPan: event.preventVerticalPan,
|
preventVerticalPan: event.preventVerticalPan || !this.panVertical,
|
||||||
preventHorizontalPan: event.preventHorizontalPan
|
preventHorizontalPan: event.preventHorizontalPan || !this.panHorizontal
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2737,8 +2737,8 @@ function onCanvasKeyPress( event ) {
|
|||||||
var canvasKeyPressEventArgs = {
|
var canvasKeyPressEventArgs = {
|
||||||
originalEvent: event.originalEvent,
|
originalEvent: event.originalEvent,
|
||||||
preventDefaultAction: false,
|
preventDefaultAction: false,
|
||||||
preventVerticalPan: event.preventVerticalPan,
|
preventVerticalPan: event.preventVerticalPan || !this.panVertical,
|
||||||
preventHorizontalPan: event.preventHorizontalPan
|
preventHorizontalPan: event.preventHorizontalPan || !this.panHorizontal
|
||||||
};
|
};
|
||||||
|
|
||||||
// This event is documented in onCanvasKeyDown
|
// This event is documented in onCanvasKeyDown
|
||||||
@ -2788,8 +2788,8 @@ function onCanvasKeyPress( event ) {
|
|||||||
break;
|
break;
|
||||||
case 97://a
|
case 97://a
|
||||||
if (!canvasKeyPressEventArgs.preventHorizontalPan) {
|
if (!canvasKeyPressEventArgs.preventHorizontalPan) {
|
||||||
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(-40, 0)));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(-40, 0)));
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
}
|
}
|
||||||
event.preventDefault = true;
|
event.preventDefault = true;
|
||||||
break;
|
break;
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
tileSources: "../data/testpattern.dzi",
|
tileSources: "../data/testpattern.dzi",
|
||||||
showNavigator:true
|
showNavigator:true
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user