mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-28 08:06:08 +03:00
Fix drawer clearance bounds
This commit is contained in:
parent
7a7ba07902
commit
cf20d9fb43
@ -271,7 +271,7 @@
|
||||
* events between different devices, causing the faster devices to slow down enough to make the zoom control
|
||||
* more manageable.
|
||||
*
|
||||
* @property {Number} [rotationIncrement=90]
|
||||
* @property {Number} [rotationIncrement=10]
|
||||
* The number of degrees to rotate right or left when the rotate buttons or keyboard shortcuts are activated.
|
||||
*
|
||||
* @property {Number} [pixelsPerWheelLine=40]
|
||||
@ -1140,7 +1140,7 @@ function OpenSeadragon( options ){
|
||||
autoResize: true,
|
||||
preserveImageSizeOnResize: false, // requires autoResize=true
|
||||
minScrollDeltaTime: 50,
|
||||
rotationIncrement: 10,
|
||||
rotationIncrement: 90,
|
||||
|
||||
//DEFAULT CONTROL SETTINGS
|
||||
showSequenceControl: true, //SEQUENCE
|
||||
|
@ -1884,21 +1884,14 @@ function drawTiles( tiledImage, lastDrawn ) {
|
||||
.getIntegerBoundingBox()
|
||||
.times($.pixelDensityRatio);
|
||||
|
||||
// if((tiledImage._drawer.viewer.viewport.flipped && !tiledImage.flipped) || (!tiledImage._drawer.viewer.viewport.flipped && tiledImage.flipped) ) {
|
||||
// tiledImage._drawer._flip({});
|
||||
// bounds.width = bounds.width - bounds.x;
|
||||
// bounds.width = tiledImage._drawer.viewer.viewport.getContainerSize().width - bounds.x;
|
||||
// console.log("BOUNDS before: ", bounds);
|
||||
|
||||
// bounds.width = bounds.width + bounds.x;
|
||||
// bounds.x = -bounds.x;
|
||||
// console.log("Bounds Image: ", tiledImage._drawer.viewer.viewport.getContainerSize());
|
||||
// }
|
||||
if((tiledImage._drawer.viewer.viewport.flipped && !tiledImage.flipped) || (!tiledImage._drawer.viewer.viewport.flipped && tiledImage.flipped) ) {
|
||||
if (tiledImage.viewport.degrees !== 0 || tiledImage.getRotation(true) % 360 !== 0){
|
||||
bounds.x = tiledImage._drawer.viewer.container.clientWidth - (bounds.x + bounds.width);
|
||||
}
|
||||
}
|
||||
}
|
||||
tiledImage._drawer._clear(true, bounds);
|
||||
}
|
||||
console.log("BOUNDS after: ", bounds);
|
||||
|
||||
// When scaling, we must rotate only when blending the sketch canvas to
|
||||
// avoid interpolation
|
||||
if (!sketchScale) {
|
||||
@ -1919,7 +1912,6 @@ function drawTiles( tiledImage, lastDrawn ) {
|
||||
|
||||
if (tiledImage.viewport.degrees == 0 && tiledImage.getRotation(true) % 360 == 0){
|
||||
if((tiledImage._drawer.viewer.viewport.flipped && !tiledImage.flipped) || (!tiledImage._drawer.viewer.viewport.flipped && tiledImage.flipped) ) {
|
||||
console.log("FLIP1");
|
||||
tiledImage._drawer._flip({});
|
||||
}
|
||||
}
|
||||
@ -1998,13 +1990,6 @@ function drawTiles( tiledImage, lastDrawn ) {
|
||||
if (tiledImage.viewport.degrees !== 0) {
|
||||
tiledImage._drawer._restoreRotationChanges(useSketch);
|
||||
}
|
||||
|
||||
// if (tiledImage.viewport.degrees == 0 && tiledImage.getRotation(true) % 360 == 0){
|
||||
// if((tiledImage._drawer.viewer.viewport.flipped && !tiledImage.flipped) || (!tiledImage._drawer.viewer.viewport.flipped && tiledImage.flipped) ) {
|
||||
// console.log("FLIP2");
|
||||
// tiledImage._drawer._flip({});
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
if (useSketch) {
|
||||
@ -2041,13 +2026,15 @@ function drawTiles( tiledImage, lastDrawn ) {
|
||||
}
|
||||
}
|
||||
|
||||
if (tiledImage.viewport.degrees == 0 && tiledImage.getRotation(true) % 360 == 0){
|
||||
if((tiledImage._drawer.viewer.viewport.flipped && !tiledImage.flipped) || (!tiledImage._drawer.viewer.viewport.flipped && tiledImage.flipped) ) {
|
||||
console.log("FLIP3");
|
||||
tiledImage._drawer._flip({});
|
||||
if (!sketchScale) {
|
||||
if (tiledImage.viewport.degrees == 0 && tiledImage.getRotation(true) % 360 == 0){
|
||||
if((tiledImage._drawer.viewer.viewport.flipped && !tiledImage.flipped) || (!tiledImage._drawer.viewer.viewport.flipped && tiledImage.flipped) ) {
|
||||
tiledImage._drawer._flip({});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
drawDebugInfo( tiledImage, lastDrawn );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user