Scopi
Scopi

Reputation: 673

adding div to openseadragon Toolbar is not working [Openseadragon]

when I add the tollbar(as in this example: http://openseadragon.github.io/examples/ui-toolbar/) properties I get an error Cannot read property 'appendChild' of null

I just want to add a div to the buttons to controlling their margin/padding

 var viewer1 = OpenSeadragon({
                 id: "mainImage",
                 maxZoomPixelRatio:6,
                toolbar:"toolbarDiv",
                panVertical:    false,
               defaultZoomLevel:    0.75,
               minZoomLevel:    0.75,
               visibilityRatio:     1,
                 preserveViewport:true, /
                 preserveImageSizeOnResize : true,
                 prefixUrl: "img",
       });

Upvotes: 0

Views: 393

Answers (1)

iangilman
iangilman

Reputation: 2174

As mentioned in https://github.com/openseadragon/openseadragon/issues/1140: Do you have an element on your page with the id toolbarDiv? If not, you'll get that error.

Upvotes: 1

Related Questions