-1

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

JanuszFrontEnd'u
  • 451
  • 6
  • 14

1 Answers1

0

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.

iangilman
  • 2,144
  • 1
  • 13
  • 16