samvera-labs / openseadragon-react-viewer

A React wrapper around the OpenSeadragon viewer which extends viewer functionality.
https://samvera-labs.github.io/openseadragon-react-viewer/
27 stars 7 forks source link

Add configurable container ID for the osd instance #80

Closed edtjones closed 3 years ago

edtjones commented 3 years ago

Hi there

I've added a configuration option to allow the instance of the <OpenSeadragonViewer> component to have a specified container ID. This means you can have more than one of them on a page without them interfering. The options prop can now take an optional containerId key with a string value; it defaults to 'openseadragon1' which should resolve any backward compatibility issues with people targeting that ID.

I've written a couple of (passing) tests to check the functionality.

Hope this is useful

edtjones commented 3 years ago

sorry - raised a PR against master instead of my feature branch