sanity-io / sanity-plugin-hotspot-array

A configurable Custom Input for Arrays that will add and update items by clicking on an Image
MIT License
23 stars 8 forks source link

HotSpots positioning on the UI #7

Closed ccoroian closed 2 years ago

ccoroian commented 2 years ago

Hello. Has anyone came across the issue where when displaying the HotSpots circles on the UI, with the exact coordinates of X% and Y% coming from Sanity, they do not align to the same locations as defined in sanity on the same image. Our problem is with the Y% that needs adjustment from our side depending on the position. Thanks

SimeonGriggs commented 2 years ago

The hotspots are positioned using the full, uncropped size of the image. Is your output image cropped perhaps?

ccoroian commented 2 years ago

Hi Simeon, Thanks for getting back on this. We have solved our issue. It was a problem with how we rendered our main image on the UI. Thanks, Cosmin