annotorious / annotorious-v2-plugins

Plugins compatible with the RecogitoJS, Annotorious and AnnotoriousOSD annotation libraries
BSD 3-Clause "New" or "Revised" License
28 stars 20 forks source link

ShapeLabels doesn't show label when tag has a URI #41

Open R-W-C opened 9 months ago

R-W-C commented 9 months ago

If you use the Shape Labels plugin and you use the TAG widget (initilialize Annatorious with this option), a label is showed, but the text is "undefined".

See https://codepen.io/r-w-c/pen/abPRBbW

Reproduce:

Expected result: shape label contains text of selected tag Actual result: shape label contains "undefined

undefined "

rsimon commented 9 months ago

Thx. Can reproduce!

This happens only for tags with URIs. P.S.: If anyone wants to pick this up: this would actually be a simple fix. URI-tags have a slightly different structure than string tags. Fix would have to be here:

https://github.com/annotorious/annotorious-v2-plugins/blob/main/plugins/annotorious-shape-labels/src/index.js#L21