mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-03-30 04:00:13 +03:00
fix cropping when viewer is rotated
This commit is contained in:
parent
69c4ccf33e
commit
5eece7d73a
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue