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
69c4ccf33e
commit
5eece7d73a
@ -484,7 +484,8 @@ export class ThreeJSDrawer extends OpenSeadragon.DrawerBase{
|
|||||||
if(item._croppingPolygons){
|
if(item._croppingPolygons){
|
||||||
let polygons = item._croppingPolygons.map(function (polygon) {
|
let polygons = item._croppingPolygons.map(function (polygon) {
|
||||||
return polygon.map(function (coord) {
|
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);
|
let clipPoint = _this.viewportCoordToDrawerCoord(point);
|
||||||
return clipPoint;
|
return clipPoint;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user