mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
fix cropping when viewer is rotated
This commit is contained in:
parent
7c81d068e6
commit
a6e621b562
@ -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