mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 17:21:50 +03:00
Merge pull request #651 from openseadragon/ian
Keyboard pan speed is now the same regardless of zoom level
This commit is contained in:
commit
f57b957390
@ -60,6 +60,7 @@ OPENSEADRAGON CHANGELOG
|
|||||||
* Optimized tile loading by clearing the queue on a re-draw when imageLoaderLimit is set (#616)
|
* Optimized tile loading by clearing the queue on a re-draw when imageLoaderLimit is set (#616)
|
||||||
* Now animating zoom spring exponentially (#631)
|
* Now animating zoom spring exponentially (#631)
|
||||||
* Added http://editorconfig.org/ config file (#637)
|
* Added http://editorconfig.org/ config file (#637)
|
||||||
|
* Keyboard pan speed is now the same regardless of zoom level (#645)
|
||||||
|
|
||||||
1.2.1:
|
1.2.1:
|
||||||
|
|
||||||
|
@ -2216,7 +2216,7 @@ function onCanvasKeyDown( event ) {
|
|||||||
if ( event.shift ) {
|
if ( event.shift ) {
|
||||||
this.viewport.zoomBy(1.1);
|
this.viewport.zoomBy(1.1);
|
||||||
} else {
|
} else {
|
||||||
this.viewport.panBy(new $.Point(0, -0.05));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(0, -40)));
|
||||||
}
|
}
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
@ -2224,16 +2224,16 @@ function onCanvasKeyDown( event ) {
|
|||||||
if ( event.shift ) {
|
if ( event.shift ) {
|
||||||
this.viewport.zoomBy(0.9);
|
this.viewport.zoomBy(0.9);
|
||||||
} else {
|
} else {
|
||||||
this.viewport.panBy(new $.Point(0, 0.05));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(0, 40)));
|
||||||
}
|
}
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
case 37://left arrow
|
case 37://left arrow
|
||||||
this.viewport.panBy(new $.Point(-0.05, 0));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(-40, 0)));
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
case 39://right arrow
|
case 39://right arrow
|
||||||
this.viewport.panBy(new $.Point(0.05, 0));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(40, 0)));
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
@ -2265,7 +2265,7 @@ function onCanvasKeyPress( event ) {
|
|||||||
if ( event.shift ) {
|
if ( event.shift ) {
|
||||||
this.viewport.zoomBy(1.1);
|
this.viewport.zoomBy(1.1);
|
||||||
} else {
|
} else {
|
||||||
this.viewport.panBy(new $.Point(0, -0.05));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(0, -40)));
|
||||||
}
|
}
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
@ -2274,16 +2274,16 @@ function onCanvasKeyPress( event ) {
|
|||||||
if ( event.shift ) {
|
if ( event.shift ) {
|
||||||
this.viewport.zoomBy(0.9);
|
this.viewport.zoomBy(0.9);
|
||||||
} else {
|
} else {
|
||||||
this.viewport.panBy(new $.Point(0, 0.05));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(0, 40)));
|
||||||
}
|
}
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
case 97://a
|
case 97://a
|
||||||
this.viewport.panBy(new $.Point(-0.05, 0));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(-40, 0)));
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
case 100://d
|
case 100://d
|
||||||
this.viewport.panBy(new $.Point(0.05, 0));
|
this.viewport.panBy(this.viewport.deltaPointsFromPixels(new $.Point(40, 0)));
|
||||||
this.viewport.applyConstraints();
|
this.viewport.applyConstraints();
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user