How to use the openseadragon.ControlAnchor function in openseadragon

To help you get started, we’ve selected a few openseadragon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NCI-GDC / portal-ui / src / packages / @ncigdc / components / ZoomableImage.js View on Github external
},
            });
            reAddFullScreenHandler(viewer);
            // to allow margins around horizontally and vertically oriented images on home zoom
            const margins = viewer.viewport.getMargins();
            viewer.viewport.setMargins(
              {
                left: 30,
                top: 10,
                right: 30,
                bottom: 10,
              },
              margins,
            );
            viewer.addControl(document.querySelector('#details-button'), {
              anchor: OpenSeadragon.ControlAnchor.TOP_LEFT,
            });
            // an empty label that 508 scan doesnt like
            document.querySelector('.openseadragon-container label').remove();
            setViewer(viewer);
          }
        });
    },

openseadragon

Provides a smooth, zoomable user interface for HTML/Javascript.

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

89 / 100
Full package analysis