Reputation: 471
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 :/
Upvotes: -1
Views: 308
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