UNPKG

@mescius/dsimageviewer

Version:

Document Solutions Image Viewer

411 lines (350 loc) 185 kB
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>GcImageViewer | Document Solutions Image Viewer - v9.1.3</title><meta name="description" content="Documentation for Document Solutions Image Viewer"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script><style type="text/css"> /* typedoc-theme-fresh */ /* @view-transition { navigation: auto; } */ :root { --light-color-background: #fafafe; --light-color-background-active: #eaeced; --light-color-text: #222222; --light-color-text-aside: #5e5e5e; --dark-color-background: #1a1a1c; --dark-color-background-active: #2f2f2b; --dark-color-text: #dfdfd6; --dark-color-text-aside: #b0b0b0; --dim-header-height: 2.5rem; --dim-footer-height: 0px; --light-code-background: #ffffff18; --dark-code-background: #00000018; } body { padding: 0; margin: 0; & > .container.container-main { margin: 0 auto; margin-top: var(--dim-header-height); --dim-container-main-margin-y: 0px; } } @media (prefers-color-scheme: light) { ::selection { background-color: #11111a20; } } @media (prefers-color-scheme: dark) { ::selection { background-color: #bbbbff48; } } :root[data-theme="light"] { ::selection { background-color: #11111a20; } } :root[data-theme="dark"] { ::selection { background-color: #bbbbff48; } } h1, h2, h3, h4, h5, h6 { font-weight: 500; } .tsd-page-toolbar { position: fixed; background: linear-gradient( to bottom, color-mix(in srgb, var(--color-background) 80%, transparent) 60%, transparent ); backdrop-filter: blur(2px); border-bottom: none; .title { font-weight: 500; font-size: 18px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; min-width: 0; margin-right: auto; &:hover { color: var(--color-contrast-text); text-decoration: none; } } .tsd-theme-toggle { display: flex; position: relative; margin-right: 12px; color: var(--color-text-aside); select { cursor: pointer; border: 1px solid var(--color-background-active); border-radius: 4px; padding: 6px 8px; padding-left: 32px; /* Space for the icon */ font-size: 14px; background: transparent; transition: background-color 200ms; color: var(--color-text-aside); /* for Firefox and Chrome: these are inconsistent */ -moz-appearance: none; -webkit-appearance: none; &:hover { background-color: var(--color-background-active); } } } } .tsd-widget { display: flex; align-items: center; height: auto; width: auto; padding: 4px; font-size: 14px; border-radius: 4px; transition: background-color 200ms; color: var(--color-text-aside); opacity: 100%; &:hover { background-color: var(--color-background-active); } } #tsd-search-results { & > li { padding-inline: 6px; transition: background-color 200ms; } a:hover { text-decoration: none; } } .col-content { overflow: hidden; padding-block: 24px; & > .tsd-typography { padding-bottom: 24px; } } .col-sidebar { top: var(--dim-header-height); /* Relevant for tablet layout. */ } .site-menu { top: var(--dim-header-height); padding-block: 24px; box-sizing: border-box; } .page-menu { top: var(--dim-header-height); padding-block: 48px 24px; box-sizing: border-box; } .tsd-navigation, .tsd-page-navigation { > details { margin-bottom: 8px; } a { border-radius: 4px; padding-inline: 6px; margin-bottom: 2px; } a:hover { text-decoration: none; background-color: var(--color-background-active); } a.current { background-color: var(--color-background-active); span { color: var(--color-contrast-text); } } } .tsd-navigation { & > a { /* Top-level navigation anchor. */ margin-block: 16px; font-size: 18px; background: transparent !important; padding: 0; &:hover { color: var(--color-contrast-text); } } } .tsd-page-navigation { border-left: 1px solid var(--color-background-active); padding-left: 4px; padding-block: 4px; } .tsd-page-navigation-section { & > summary > svg { margin-right: 0; } & > div { margin-left: 24px; } } .tsd-page-title { color: var(--color-contrast-text); } h1 > code.tsd-tag { margin-left: 12px; } code.tsd-tag { display: inline-block; transform: translateY(-0.1em); background: var(--color-background-secondary); border: 0; border-radius: 8px; padding: 2px 4px; } .tsd-breadcrumb { margin-bottom: 12px; li:after { content: " › "; opacity: 0.4; } li:last-of-type::after { content: ""; } } .tsd-signature, .tsd-signatures .tsd-signature { border: 0; border-radius: 8px; background: var(--color-background-secondary); font-weight: 500; padding: 10px 8px; line-height: 1.3; } .tsd-anchor-icon { color: var(--color-text-aside); padding-bottom: 1px; } .tsd-kind-icon { filter: grayscale(0.5) opacity(0.8); } /* Accordion icon */ .tsd-accordion-summary > svg { color: var(--color-text-aside); opacity: 50%; stroke-width: 1px; transition: transform 200ms ease-in-out; } .tsd-accordion-summary > svg:has(+ h2) { height: 24px; width: 24px; } /* Desktop sizing */ @media (min-width: 1200px) { .container-main { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2.5fr) minmax(0, 17rem); } .site-menu { padding-right: 8px; } .page-menu { padding-left: 24px; } .tsd-widget.menu { display: none; } } /* Tablet sizing */ @media (min-width: 770px) and (max-width: 1199px) { .page-menu { padding-block: 24px 24px; } .site-menu { padding-block: 0 24px; margin-top: 0; } .tsd-widget.menu { display: none; } .lg-show { display: none !important; } } /* Mobile sizing */ @media (max-width: 769px) { .page-menu { display: none; } .site-menu { padding: 0; } .container { padding: 0 1rem; } .has-menu .col-sidebar { padding: 0 1rem; max-height: 100dvh; } .lg-show { display: none !important; } .md-show { display: none !important; } } </style></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Document Solutions Image Viewer</a><div id="tsd-toolbar-links"></div><div class="tsd-theme-toggle md-show" style="position: relative"><div style="position: absolute; left: 8px; top: 4px; pointer-events: none"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun-moon-icon lucide-sun-moon"><path d="M12 2v2"></path><path d="M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715"></path><path d="M16 12a4 4 0 0 0-4-4"></path><path d="m19 5-1.256 1.256"></path><path d="M20 12h2"></path></svg></div><select id="tsd-theme"><option value="os">System</option><option value="light">Light</option><option value="dark">Dark</option></select></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search" style=" border: 1px solid var(--color-background-active); border-radius: 4px; margin-left: 8px; "><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-search-icon lucide-search" style="margin-bottom: 1px; margin-left: 4px; margin-right: 4px;"><path d="m21 21-4.34-4.34"></path><circle cx="11" cy="11" r="8"></circle></svg><span class="lg-show" style="margin-left: 4px; margin-right: 12ch;">Search…</span></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu" style=" border: 1px solid var(--color-background-active); border-radius: 4px; margin-left: 4px; "><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu-icon lucide-menu" style="margin-left: 4px; margin-right: 4px;"><path d="M4 5h16"></path><path d="M4 12h16"></path><path d="M4 19h16"></path></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">GcImageViewer</a></li></ul><h1>Class GcImageViewer</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Document Solutions Image Viewer is a fast JavaScript based client-side Image Viewer that runs in all major browsers.</p> <p>Note that DsImageViewer is the new name for GcImageViewer, with the same API.</p> <p>During this transition period we are publishing both versions, but it is recommended that you switch to using DsImageViewer when possible.</p></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="javascript"><span class="hl-0">const</span><span class="hl-2"> </span><span class="hl-10">viewer</span><span class="hl-2"> = </span><span class="hl-0">new</span><span class="hl-2"> </span><span class="hl-11">GcImageViewer</span><span class="hl-2">(</span><span class="hl-4">&quot;#root&quot;</span><span class="hl-2">);</span> </code><button type="button">Copy</button></pre> </div></div></section><section class="tsd-panel tsd-hierarchy" data-refl="1"><h4>Hierarchy (<a href="../hierarchy.html#GcImageViewer">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">GcImageViewer</span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="DsImageViewer.html" class="tsd-signature-type tsd-kind-class">DsImageViewer</a></li></ul></li></ul></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/ImageViewerAPI.html" class="tsd-signature-type tsd-kind-interface">ImageViewerAPI</a></li></ul></section><div style="margin-top: 64px"></div><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Constructors</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="constructor"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="constructorgcimageviewer"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">GcImageViewer</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">element</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ViewerOptions.html" class="tsd-signature-type tsd-kind-interface">ViewerOptions</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">GcImageViewer</a><a href="#constructorgcimageviewer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>ImageViewer constructor.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">element</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">HTMLElement</span></span><div class="tsd-comment tsd-typography"><p>Required. HTML element or CSS selector.</p> </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ViewerOptions.html" class="tsd-signature-type tsd-kind-interface">ViewerOptions</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>Optional. Viewer options.</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">GcImageViewer</a></h4></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Methods</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="findcontrol"><code class="tsd-tag">Static</code><span>find<wbr/>Control</span><a href="#findcontrol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="findcontrol-1"><span class="tsd-kind-call-signature">findControl</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">selector</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/ImageViewerAPI.html" class="tsd-signature-type tsd-kind-interface">ImageViewerAPI</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span><a href="#findcontrol-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets the viewer instance using the host element or host element selector.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">selector</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">HTMLElement</span></span><div class="tsd-comment tsd-typography"><p>Root HTML element or its CSS selector</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/ImageViewerAPI.html" class="tsd-signature-type tsd-kind-interface">ImageViewerAPI</a> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></h4><p>Image Viewer instance if found</p> <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-1">Example<a href="#example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="javascript"><span class="hl-0">const</span><span class="hl-2"> </span><span class="hl-10">viewer</span><span class="hl-2"> = </span><span class="hl-1">DsImageViewer</span><span class="hl-2">.</span><span class="hl-11">findControl</span><span class="hl-2">(</span><span class="hl-4">&quot;#root&quot;</span><span class="hl-2">);</span> </code><button type="button">Copy</button></pre> </div></div></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="ensurepaintlayer"><span>ensure<wbr/>Paint<wbr/>Layer</span><a href="#ensurepaintlayer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="ensurepaintlayer-1"><span class="tsd-kind-call-signature">ensurePaintLayer</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/ImageLayer.html" class="tsd-signature-type tsd-kind-interface">ImageLayer</a><a href="#ensurepaintlayer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Create at least one image layer which will be used for painting.</p> </div><h4 class="tsd-returns-title">Returns <a href="../interfaces/ImageLayer.html" class="tsd-signature-type tsd-kind-interface">ImageLayer</a></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#ensurepaintlayer">ensurePaintLayer</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="removelayer"><span>remove<wbr/>Layer</span><a href="#removelayer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="removelayer-1"><span class="tsd-kind-call-signature">removeLayer</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">layerOrIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/ImageLayer.html" class="tsd-signature-type tsd-kind-interface">ImageLayer</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#removelayer-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Remove and dispose image layer given by argument layerOrIndex.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">layerOrIndex</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/ImageLayer.html" class="tsd-signature-type tsd-kind-interface">ImageLayer</a></span><div class="tsd-comment tsd-typography"><p>Image layer or image layer index or image layer name.</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#removelayer">removeLayer</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="removelayers"><span>remove<wbr/>Layers</span><a href="#removelayers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="removelayers-1"><span class="tsd-kind-call-signature">removeLayers</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#removelayers-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Remove and dispose all image layers.</p> </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#removelayers">removeLayers</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="applyoptions"><span>apply<wbr/>Options</span><a href="#applyoptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="applyoptions-1"><span class="tsd-kind-call-signature">applyOptions</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#applyoptions-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Call this method in order to apply changed options.</p> </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-2">Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="javascript"><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">applyOptions</span><span class="hl-2">();</span> </code><button type="button">Copy</button></pre> </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#applyoptions">applyOptions</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="applytoolbarlayout"><span>apply<wbr/>Toolbar<wbr/>Layout</span><a href="#applytoolbarlayout" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="applytoolbarlayout-1"><span class="tsd-kind-call-signature">applyToolbarLayout</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#applytoolbarlayout-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Call this method in order to apply changes in @see:toolbarLayout.</p> </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-3">Example<a href="#example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="javascript"><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-1">toolbarLayout</span><span class="hl-2">.</span><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-1">default</span><span class="hl-2"> = [</span><span class="hl-4">&quot;open&quot;</span><span class="hl-2">, </span><span class="hl-4">&quot;save&quot;</span><span class="hl-2">];</span><br/><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">applyToolbarLayout</span><span class="hl-2">();</span> </code><button type="button">Copy</button></pre> </div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-4">Example<a href="#example-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="javascript"><span class="hl-2"> </span><span class="hl-0">const</span><span class="hl-2"> </span><span class="hl-10">viewer</span><span class="hl-2"> = </span><span class="hl-0">new</span><span class="hl-2"> </span><span class="hl-11">DsImageViewer</span><span class="hl-2">(</span><span class="hl-1">document</span><span class="hl-2">.</span><span class="hl-11">querySelector</span><span class="hl-2">(</span><span class="hl-4">&quot;#viewer&quot;</span><span class="hl-2">));</span><br/><span class="hl-2"> </span><span class="hl-0">const</span><span class="hl-2"> </span><span class="hl-10">toolbar</span><span class="hl-2"> = </span><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-1">toolbar</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">const</span><span class="hl-2"> </span><span class="hl-10">toolbarLayout</span><span class="hl-2"> = </span><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-1">toolbarLayout</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-1">toolbar</span><span class="hl-2">.</span><span class="hl-11">addItem</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-1">key:</span><span class="hl-2"> </span><span class="hl-4">&#39;custom-action&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">icon:</span><span class="hl-2"> { </span><span class="hl-1">type:</span><span class="hl-2"> </span><span class="hl-4">&quot;svg&quot;</span><span class="hl-2">, </span><span class="hl-1">content:</span><span class="hl-2"> </span><span class="hl-4">&#39;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot;&gt;&lt;path style=&quot;fill: #205F78;&quot; d=&quot;M20.25 12l-2.25 2.25 2.25 2.25-3.75 3.75-2.25-2.25-2.25 2.25-2.25-2.25-2.25 2.25-3.75-3.75 2.25-2.25-2.25-2.25 2.25-2.25-2.25-2.25 3.75-3.75 2.25 2.25 2.25-2.25 2.25 2.25 2.25-2.25 3.75 3.75-2.25 2.25 2.25 2.25z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&#39;</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-1">title:</span><span class="hl-2"> </span><span class="hl-4">&#39;Custom action&#39;</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">checked:</span><span class="hl-2"> </span><span class="hl-0">false</span><span class="hl-2">, </span><span class="hl-1">enabled:</span><span class="hl-2"> </span><span class="hl-0">false</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-11">action</span><span class="hl-1">:</span><span class="hl-2"> </span><span class="hl-0">function</span><span class="hl-2"> () {</span><br/><span class="hl-2"> </span><span class="hl-11">alert</span><span class="hl-2">(</span><span class="hl-4">&quot;Implement your action here.&quot;</span><span class="hl-2">);</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-11">onUpdate</span><span class="hl-1">:</span><span class="hl-2"> </span><span class="hl-0">function</span><span class="hl-2"> (</span><span class="hl-1">args</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-13">return</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-1">enabled:</span><span class="hl-2"> </span><span class="hl-0">true</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">checked:</span><span class="hl-2"> </span><span class="hl-0">false</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-1">title:</span><span class="hl-2"> </span><span class="hl-4">&#39;Custom action title&#39;</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> });</span><br/><span class="hl-2"> </span><span class="hl-1">toolbarLayout</span><span class="hl-2">.</span><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-1">default</span><span class="hl-2">.</span><span class="hl-11">splice</span><span class="hl-2">(</span><span class="hl-14">0</span><span class="hl-2">, </span><span class="hl-14">0</span><span class="hl-2">, </span><span class="hl-4">&quot;custom-action&quot;</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">applyToolbarLayout</span><span class="hl-2">();</span> </code><button type="button">Copy</button></pre> </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#applytoolbarlayout">applyToolbarLayout</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="addplugin"><span>add<wbr/>Plugin</span><a href="#addplugin" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="addplugin-1"><span class="tsd-kind-call-signature">addPlugin</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">plugin</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/ImageViewerPluginReference.html" class="tsd-signature-type tsd-kind-interface">ImageViewerPluginReference</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#addplugin-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a plugin instance to the <code>DsImageViewer</code>. This method is now intended for internal and officially supported plugins only. Custom or third-party plugins are <strong>no longer supported</strong> starting from version 9.0. The plugin system remains available for internal use to provide optional viewer features, such as <code>ImageFiltersPlugin</code>, <code>PageToolsPlugin</code>, and <code>PaintToolsPlugin</code>. Attempting to register non-official plugins may lead to undefined behavior and is not supported by the product team.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">plugin</span>: <a href="../interfaces/ImageViewerPluginReference.html" class="tsd-signature-type tsd-kind-interface">ImageViewerPluginReference</a></span><div class="tsd-comment tsd-typography"><p>The plugin instance</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if added successfully; otherwise <code>false</code>.</p> <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-5">Example<a href="#example-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="javascript"><span class="hl-12">// ✅ Supported (built-in plugin)</span><br/><span class="hl-0">const</span><span class="hl-2"> </span><span class="hl-10">viewer</span><span class="hl-2"> = </span><span class="hl-0">new</span><span class="hl-2"> </span><span class="hl-11">DsImageViewer</span><span class="hl-2">(</span><span class="hl-4">&quot;#root&quot;</span><span class="hl-2">);</span><br/><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">addPlugin</span><span class="hl-2">(</span><span class="hl-0">new</span><span class="hl-2"> </span><span class="hl-11">ImageFiltersPlugin</span><span class="hl-2">());</span><br/><br/><span class="hl-12">// ❌ Not supported (custom plugin)</span><br/><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">addPlugin</span><span class="hl-2">(</span><span class="hl-0">new</span><span class="hl-2"> </span><span class="hl-11">CustomPlugin</span><span class="hl-2">()); </span><span class="hl-12">// Custom plugins are no longer supported</span> </code><button type="button">Copy</button></pre> </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#addplugin">addPlugin</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="addkeyboardlistener"><span>add<wbr/>Keyboard<wbr/>Listener</span><a href="#addkeyboardlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="addkeyboardlistener-1"><span class="tsd-kind-call-signature">addKeyboardListener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">uniqueKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">handler</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/WindowKeyboardListener.html" class="tsd-signature-type tsd-kind-interface">WindowKeyboardListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addkeyboardlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Add window keyboard listener.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">uniqueKey</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Listener key.</p> </div></li><li><span><span class="tsd-kind-parameter">handler</span>: <a href="../interfaces/WindowKeyboardListener.html" class="tsd-signature-type tsd-kind-interface">WindowKeyboardListener</a></span><div class="tsd-comment tsd-typography"><p>Keyboard event handler.</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#addkeyboardlistener">addKeyboardListener</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="removekeyboardlistener"><span>remove<wbr/>Keyboard<wbr/>Listener</span><a href="#removekeyboardlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="removekeyboardlistener-1"><span class="tsd-kind-call-signature">removeKeyboardListener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">uniqueKey</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#removekeyboardlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Remove window keyboard listener.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">uniqueKey</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Listener key.</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#removekeyboardlistener">removeKeyboardListener</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="configurepluginmaintoolbar"><span>configure<wbr/>Plugin<wbr/>Main<wbr/>Toolbar</span><a href="#configurepluginmaintoolbar" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="configurepluginmaintoolbar-1"><span class="tsd-kind-call-signature">configurePluginMainToolbar</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">pos</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">buttonsToInsert</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#configurepluginmaintoolbar-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Allows to configure the main toolbar layout.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">pos</span>: <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span></span><div class="tsd-comment tsd-typography"><p>The position where the buttons should be inserted. Use <code>false</code> or <code>-1</code> to skip insertion. Undefined means the position will be determined automatically.</p> </div></li><li><span><span class="tsd-kind-parameter">buttonsToInsert</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>An array of button keys to be inserted.</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-6">Example<a href="#example-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-12">// Apply a custom layout to insert &quot;zoomIn&quot; and &quot;zoomOut&quot; buttons at position 2 for the &quot;PaintTools&quot; plugin.</span><br/><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">configurePluginMainToolbar</span><span class="hl-2">(</span><span class="hl-14">2</span><span class="hl-2">, [</span><span class="hl-4">&quot;zoomIn&quot;</span><span class="hl-2">, </span><span class="hl-4">&quot;zoomOut&quot;</span><span class="hl-2">]);</span> </code><button type="button">Copy</button></pre> </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#configurepluginmaintoolbar">configurePluginMainToolbar</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="geteventcanvaspoint"><span>get<wbr/>Event<wbr/>Canvas<wbr/>Point</span><a href="#geteventcanvaspoint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="geteventcanvaspoint-1"><span class="tsd-kind-call-signature">getEventCanvasPoint</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">MouseEvent</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">PointerEvent</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">includeDpi</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/PointLocation.html" class="tsd-signature-type tsd-kind-interface">PointLocation</a><a href="#geteventcanvaspoint-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Retrieves the point location from the pointer event provided by the 'event' parameter. The returned point is relative to the active canvas element.</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">MouseEvent</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">PointerEvent</span></span><div class="tsd-comment tsd-typography"><p>DOM Pointer or Mouse event object.</p> </div></li><li><span><span class="tsd-kind-parameter">includeDpi</span>: <span class="tsd-signature-type">boolean</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/PointLocation.html" class="tsd-signature-type tsd-kind-interface">PointLocation</a></h4><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#geteventcanvaspoint">getEventCanvasPoint</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="setcursor"><span>set<wbr/>Cursor</span><a href="#setcursor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="setcursor-1"><span class="tsd-kind-call-signature">setCursor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">cursorType</span><span class="tsd-signature-symbol">:</span> <a href="../types/GlobalCursorType.html" class="tsd-signature-type tsd-kind-type-alias">GlobalCursorType</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#setcursor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sets the cursor style for the image viewer</p> </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">cursorType</span>: <a href="../types/GlobalCursorType.html" class="tsd-signature-type tsd-kind-type-alias">GlobalCursorType</a></span><div class="tsd-comment tsd-typography"><p>The cursor style to apply</p> </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-7">Example<a href="#example-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-12">// Set rotate cursor during image rotation</span><br/><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">setCursor</span><span class="hl-2">(</span><span class="hl-4">&#39;rotate&#39;</span><span class="hl-2">);</span> </code><button type="button">Copy</button></pre> </div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-8">Example<a href="#example-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-12">// Set resize cursor when hovering over edges</span><br/><span class="hl-1">viewer</span><span class="hl-2">.</span><span class="hl-11">setCursor</span><span class="hl-2">(</span><span class="hl-4">&#39;nwse-resize&#39;</span><span class="hl-2">);</span> </code><button type="button">Copy</button></pre> </div><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see">See<a href="#see" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>GlobalCursorType for all available cursor options</p> </div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/ImageViewerAPI.html">ImageViewerAPI</a>.<a href="../interfaces/ImageViewerAPI.html#setcursor">setCursor</a></p></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="resetcursor"><span>reset<wbr/>Cursor</span><a href="#resetcursor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resetcursor-1"><span class="tsd-kind-call-signature">resetCursor</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#resetcursor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/