mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
fix cropping when viewer is rotated
This commit is contained in:
parent
69c4ccf33e
commit
5eece7d73a
@ -484,7 +484,8 @@ export class ThreeJSDrawer extends OpenSeadragon.DrawerBase{
|
||||
if(item._croppingPolygons){
|
||||
let polygons = item._croppingPolygons.map(function (polygon) {
|
||||
return polygon.map(function (coord) {
|
||||
let point = item.imageToViewportCoordinates(coord.x, coord.y, true);
|
||||
let point = item.imageToViewportCoordinates(coord.x, coord.y, true)
|
||||
.rotate(_this.viewer.viewport.getRotation(true), _this.viewer.viewport.getCenter(true));
|
||||
let clipPoint = _this.viewportCoordToDrawerCoord(point);
|
||||
return clipPoint;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user