I'm trying to best integrate annotorious with angular. The Annotorius library although described, it is particularly difficult to debug. (see what I mean at annotorious.debug.js )
So far, I created my own solution with angular-annotorious (free MIT open source project DISCLAIMER: i'm the maintainer of it.), that offers 2 directives for tag and attribute cases, also a service to access the anno object.
I'm facing problems with dynamic contents, like sliders. (note that I do know that for ng-src images special treatment may be needed due to the img src cycle)
The annotated images with an unique URL, once recreated in the DOM tree, it does not seem to get annotated once again if we call
anno.makeAnnotatable(img)
To reproduce it, see the colorbox example (colorbox is a free open source modal library)
Are there any interesting ideas how to integrate/annotate dynamic content that may reappear?
I found the solution, instead of doing a "shutting down" annotorious, we simply call the reset function in the onLoad and onCleanup events which is critical for dynamic content like colorbox or fancybox.
The code for dynamic integration with colorbox looks like this:
The working example is now at: Annotorious in Colorbox Gallery
This example relies on angular-annotorious using the annotoriousService.
DISCLAIMER: i'm the maintainer of angular-annotorious which is a free MIT open source project.