Skip to content

Commit fca333d

Browse files
committed
Add back support for scale parameter and make default scale 1
1 parent e54dcec commit fca333d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

openseadragon-fabricjs-overlay.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
this._fabricjsOverlayInfo._scale = options.scale; // arbitrary scale for created fabric canvas
2929
}
3030
else {
31-
this._fabricjsOverlayInfo._scale = 1000;
31+
this._fabricjsOverlayInfo._scale = 1;
3232
}
3333

3434
return this._fabricjsOverlayInfo;
@@ -178,9 +178,8 @@
178178
let viewportZoom = this._viewer.viewport.getZoom(true);
179179
this._fabricCanvas.setWidth(this._containerWidth);
180180
this._fabricCanvas.setHeight(this._containerHeight);
181-
// let zoom = this._viewer.viewport._containerInnerSize.x * viewportZoom / this._scale;
182-
// this._fabricCanvas.setZoom(zoom);
183-
this._fabricCanvas.setZoom(viewportZoom);
181+
let zoom = this._viewer.viewport._containerInnerSize.x * viewportZoom / this._scale;
182+
this._fabricCanvas.setZoom(zoom);
184183
let viewportWindowPoint = this._viewer.viewport.viewportToWindowCoordinates(origin);
185184
let x = Math.round(viewportWindowPoint.x);
186185
let y = Math.round(viewportWindowPoint.y);

0 commit comments

Comments
 (0)