new LensDashboardNavigator(viewer [, options])
Creates a new LensDashboardNavigator instance.
Parameters:
Name | Type | Argument | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewer |
Viewer | The OpenLIME viewer instance |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Configuration options Properties
|
- Source:
Extends
Methods
-
append(elm)
-
Adds an HTML element to the dashboard container. The element should use absolute positioning relative to the container. Example:
const button = document.createElement('button'); button.style = 'position: absolute; left: 10px; top: 10px;'; lensDashboard.append(button);
Parameters:
Name Type Description elm
HTMLElement The HTML element to add
- Inherited From:
- Overrides:
- Source:
-
removeMaskFromSvgLayer(svg)
-
Removes the lens mask from an SVG element. Returns the element to its normal, unmasked rendering.
Parameters:
Name Type Description svg
SVGElement The SVG element to unmask
- Inherited From:
- Overrides:
- Source:
-
setActionEnabled(label [, enable])
-
Enables or disables a specific action button.
Parameters:
Name Type Argument Default Description label
string The action label to modify
enable
boolean <optional>
true Whether to enable or disable the action
- Source:
-
setBackgroundRenderingMode(mode)
-
Sets the rendering mode for the background (area outside the lens). Controls whether content outside the lens is shown or hidden.
Parameters:
Name Type Description mode
RenderingMode The rendering mode to use
- Inherited From:
- Overrides:
- Source:
-
setLayerSvgAnnotation(layer)
-
Associates a LayerSvgAnnotation with the dashboard. This enables proper masking of SVG annotations within the lens area.
Parameters:
Name Type Description layer
LayerSvgAnnotation The SVG annotation layer to associate
- Inherited From:
- Overrides:
- Source:
-
setLensRenderingMode(mode)
-
Sets the rendering mode for the lens area. Controls whether content inside the lens is shown or hidden.
Parameters:
Name Type Description mode
RenderingMode The rendering mode to use
- Inherited From:
- Overrides:
- Source:
-
setMaskOnSvgLayer(svg)
-
Applies the lens mask to an SVG element. Elements with the mask will only be visible within the lens area (or outside, depending on mask configuration).
Parameters:
Name Type Description svg
SVGElement The SVG element to mask
- Inherited From:
- Overrides:
- Source:
-
toggle()
-
Toggles the visibility of the dashboard UI elements. Uses CSS classes to show/hide the interface.
- Inherited From:
- Overrides:
- Source: