Skip to content

Mirador-image-tools : problem after clearing UI and recreating mirador #25

@ydvelaitzky

Description

@ydvelaitzky

Hi
The html:

<div id="container">
      <div id="demo"></div>
  </div>

In some case I need to empty the container element and rebuild the viewer.
I do it with the following simple js code:

//clear the element:
document.getElementById('container').innerHTML = '<div id="demo"></div>';
 
 //rebuild mirador:
 const config = {
               id: 'demo',
               windows: [{
                   manifestId: 'https://iiif.bodleian.ox.ac.uk/iiif/manifest/e32a277e-91e2-4a6d-8ba6-cc4bad230410.json',
               }],
  };
 
 
 Mirador.viewer(config, [
 ]);

Everything worked fine until added the mirador-image-tools plugin. Now after clearing the element and rebuild mirador :
Mirador.viewer(config, [ ...miradorImageToolsPlugin, ]);
mirador navigation is displayed strange , something is wrong with the css:
image

I uploaded the sample to https://fjmstest.genizah.org/Temp/testMirador.html
You can see it in live. There are 2 buttons, one for seeing it in a regular case – without image-tools , and the second includes image-tools and shows the problem in the navigation area. Try to click twice on that button.

Can you please help me? Thank you so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions