JanuszFrontEnd'u
JanuszFrontEnd'u

Reputation: 471

How to get image corner position after rotate in OpenSeadragon

Hi I have a problem with getting the x and y coordinates for the corner after rotation. When I transfer the image, it always gets the correct coordinates, but as soon as the image is rotated, it receives the coordinates from the corner of the viewport, not the image :/

enter image description here

Upvotes: -1

Views: 308

Answers (1)

iangilman
iangilman

Reputation: 2174

Is this with the viewport rotated or the image rotated? If it's the image rotated, I believe this should work:

viewer.world.getItemAt(0).getBounds().getTopLeft()

Actually, that might work properly with the viewport rotated as well. The result is in viewport coordinates... I assume that's what you want? If not, you can convert to the other coordinate systems as needed.

Upvotes: 0

Related Questions