You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Mirador (3.4.3) in an Angular project, where I would like to render multiple Mirador viewers into different containers in the DOM. Though I could theoretically generate unique IDs for all of these containers and use the built-in id init functionality (Mirador.viewer({id: '', ...})), in this context it would make much more sense to be able to init Mirador by passing the DOM element directly to the constructor. In my (Angular) use case with a ViewChild, but I can also imagine other scenarios where one already has a reference to the DOM container to be used, even when it does not have a unique id.
From what I'm seeing, this is not supported yet, but perhaps I'm missing something:
I would say the most straightforward solution would be to add an 'element' or 'container' key to the config as an alternative to passing id. As a quick fix, I was hoping that I could init without passing id and then use the renderInto function to pass my container, but that seems to be a private function.
Do you see the value for this as well? If so, I'd be happy to create a PR for this.
All the best and thanks for the awesome project,
-Simon
The text was updated successfully, but these errors were encountered:
Hi there,
I'm using Mirador (3.4.3) in an Angular project, where I would like to render multiple Mirador viewers into different containers in the DOM. Though I could theoretically generate unique IDs for all of these containers and use the built-in id init functionality (
Mirador.viewer({id: '', ...})
), in this context it would make much more sense to be able to init Mirador by passing the DOM element directly to the constructor. In my (Angular) use case with a ViewChild, but I can also imagine other scenarios where one already has a reference to the DOM container to be used, even when it does not have a unique id.From what I'm seeing, this is not supported yet, but perhaps I'm missing something:
mirador/src/lib/MiradorViewer.js
Line 21 in 3b4e128
I would say the most straightforward solution would be to add an 'element' or 'container' key to the config as an alternative to passing id. As a quick fix, I was hoping that I could init without passing id and then use the
renderInto
function to pass my container, but that seems to be a private function.Do you see the value for this as well? If so, I'd be happy to create a PR for this.
All the best and thanks for the awesome project,
-Simon
The text was updated successfully, but these errors were encountered: