Please open a support ticket from our new Support page.
Front Page › Forums › Problems › Integrating image tagging
I’m trying to integrate a simple image region tagging system so
that Galleria displays previously created tags on the main display
image, by rendering out a JSON array of tags to the data layer HTML
for each image. Since I can’t be sure in advance what size Galleria
will display the image, the tags are stored with position and size
expressed as a proportion of the image size when the tags are
created, such that the X, Y, width and height of the tags are
always a value between 0 and 1.
I’ve hooked in to the loadstart event (apparently the only time
I can modify the HTML data layer) but can’t find a way to get the
displayed width/height of the image being loaded.
Is there any way I can get or calculate the display size of the
image within the function I’ve hooked to the loadstart event?