ImageAnnotation with multiple images


We are using ImageAnnotation but noticed that it does not seem to work properly with Omeka items that contain multiple images. By default, it seems that the jQuery ends up repeating the first image rather than presenting the different images. I think the problem is that the jQuery is not selecting objects with enough specificity.

I think the problem is with line 218 of plugin.php. It was:

jQuery('.annotated-images img.full').annotateImage(<?php echo json_encode($fileAnnotations); ?>);

The selector (.annotated-images img.full) applies to any of the images. I think it should be:

jQuery('#annotated-images-file-<?php echo $imageId; ?> img.full').annotateImage(<?php echo json_encode($fileAnnotations); ?>);

which applies to the specific images.

Here's an example of it working properly (I think):

I assume this is the right place to post this kind of thing, but if there's a better avenue, please feel free to recommend.