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

ImageView.createOpenSeadragonInstance should export fetched info.json metadata #1378

Closed markmatney closed 4 years ago

markmatney commented 7 years ago

For context, please see this issue on the "dbmdz/mirador-plugins" repository.

Currently, if an implementer supplies physical dimension metadata according to schemes 3) or 4) (i.e., embedded in or referenced by info.json), that PhysicalRuler plugin breaks. The problem is that once the info.json metadata is fetched, it is thrown away when the callback returns. In order to support the physical ruler plugin move towards complete spec compliance, the metadata should be made available as a property on the ImageView object. So, inside that callback function, do something like

createOpenSeadragonInstance: function(imageUrl) {
    ...
    jQuery.getJSON(infoJsonUrl).done(function (infoJson, status, jqXHR) {
        ...
        _this.currentInfoJson = infoJson;
        ...
    });
}
camillevilla commented 4 years ago

This ticket is being closed as part of the Mirador 3 issues review. We encourage all Mirador 2 implementers to try out Mirador 3 and leave feedback in new tickets.