ProjectMirador / mirador

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
https://projectmirador.org
Apache License 2.0
557 stars 256 forks source link

API request: hook for displaying property values #1959

Open eroux opened 5 years ago

eroux commented 5 years ago

Here is our use case:

We are dealing with languages that can be displayed in various manners, for instance:

We allow our users to specify some preferences and want to display the labels of the manifests in the language and transliteration chosen by the user. We don't want to include all these labels into our manifests because moving from one transliteration to another is a 1:1 translation (and including them all would make our manifests less readable). So we would like to implement the mechanism to display a property value ourselves.

So the request is:

Would it be possible to allow users (in the sense of users of the API) to give Mirador a JavaScript function taking the value of a Property Value and returning the string Mirador should display? That way we would handle all the complexity ourselves.

eroux commented 5 years ago

see also https://github.com/UniversalViewer/universalviewer/issues/646 and https://github.com/DDMAL/diva.js/issues/472

charbugs commented 5 years ago

@eroux Thank you for the request. We're currently about to conceive the external API of Mirador 3 and will consider your use case.

eroux commented 5 years ago

thanks!