ProjectMirador / mirador-annotations

a Mirador 3 plugin that adds annotation creation tools to the user interface
https://mirador-annotations.netlify.app/
38 stars 37 forks source link

Annotations both fetched by Mirador and the annotation adapter end up duplicated #42

Open FrFerry opened 3 years ago

FrFerry commented 3 years ago

Hello, I'm currently working on integrating mirador-annotations to an existing project using mirador 3. The iiif server I use serves iiif2 manifests and annotations. Mirador natively loads the annotations when if finds them in the manifest. The annotation adapter also loads these annotations which leads to the annotations being duplicated (react complains about duplicate keys in annotations panel).

As a side note: to be able to edit our annotations using the plugin, I used a custom adapter which converts iiif2 to iiif3 (using piece of code from this adapter: https://github.com/ProjectMirador/mirador-annotations/blob/master/src/SimpleAnnotationServerV2Adapter.js ). So in "all()" method, I fetch annotations from our iiif server and convert them to iiif3.

I'm not sure if it's an issue with the plugin, or if I missed a part somewhere. Maybe I should disable native loading of annotations by Mirador by some way ?

nmerm commented 9 months ago

@FrFerry : I'm facing the exact same problem. Which solution did you end up using (if any)?

FrFerry commented 9 months ago

@FrFerry : I'm facing the exact same problem. Which solution did you end up using (if any)?

Hi, I'm sorry but I don't remember what we did to solve this issue if we managed to solve it :/ Here is our plugin code: https://github.com/chartes/adele-vue/tree/dev/src/components/mirador-plugin, I hope it will help you :fox_face:

nmerm commented 9 months ago

I am not surprised that you don't remember, that's a pretty old issue! 😅 Thank you for the link to your code! I'll have a look.