jhu-digital-manuscripts / AnIOp

to track the activities of the Mellon funded Annotation Interoperability project
0 stars 0 forks source link

Augment plugins to be able to map annotation IDs to annotations that target them #82

Closed jabrah closed 4 years ago

jabrah commented 4 years ago

Some of our annotations can target annotations. This is not normally handled by Mirador. In order to act on this, we should be able to map annotations to a list of annotations that target it. As far as I can currently tell, this can be done in one of two ways:

1) Custom reducer that can create this mapping and add it to the application state. This would then require a custom selector to retrieve this state 2) Custom selector ONLY that can do the mapping

I personally would prefer the first option for performance reasons, as this mapping could be expensive and we don't want to have to do it every time the annotation panel re-renders.

With this mapping available, our display components can simply be given a list of related annotations to render, perhaps in a fancy tooltip or something.