Class: GeneralModeExtension
Class: GeneralModeExtension
General mode extension. Used for common model view state. Does not have any specific options.
Hierarchy
ModeExtensionBase
<any
>↳
GeneralModeExtension
Implements
ViewpointState
Constructors
constructor
• new GeneralModeExtension(viewerName
, options
): GeneralModeExtension
Parameters
Name | Type | Description |
---|---|---|
viewerName | string | Owner viewer name. |
options | Object | additional options for extension. |
options.restoreStateHandler? | Function | - |
options.restoreTooltipStateHandler? | Function | - |
options.saveStateHandler? | Function | - |
options.saveTooltipStateHandler? | Function | - |
Returns
Overrides
Properties
enableTooltip
• enableTooltip: boolean
Enable or disable viewer tooltip feature for this extension.
Inherited from
ModeExtensionBase.enableTooltip
getName
• getName: () => string
Get unique extension name.
Type declaration
▸ (): string
Get unique extension name.
Returns
string
Inherited from
helpDesc
• Readonly
helpDesc: string
Optional description for placing on HelpToolbar.
Inherited from
helpIcon
• Readonly
helpIcon: string
Optional icon for placing on HelpToolbar.
Inherited from
hideToolbar
• hideToolbar: boolean
Is extension need to hide toolbar or not.
Inherited from
modeDesc
• Readonly
modeDesc: string
Mode description or name.
Inherited from
modeIcon
• Readonly
modeIcon: string
Mode icon name. Icon name will be used by viewer Toolbar UI component for displaying mode buttons.
Inherited from
showTooltip
• showTooltip: boolean
Show or hide viewer tooltip feature if enableTooltip == true.
Inherited from
state
• state: RenderSettingsState
General extension data which can be stored in browser local storage and restored after. State will be saved in local storage with 'tangl-ext-extensionName' key.
Overrides
type
• Readonly
type: string
Extension type (ext, mode, control).
Inherited from
viewerName
• Readonly
viewerName: string
Owner viewer name.
Inherited from
Methods
clearData
▸ clearData(): void
Clear resource array, details array and elements list.
Returns
void
Inherited from
getRenderManager
▸ getRenderManager(): RenderManager
Get current RenderManager instance.
Returns
Inherited from
ModeExtensionBase.getRenderManager
modeIconRender
▸ modeIconRender(container
): void
Render function for rendering icon content for Toolbar component.
Parameters
Name | Type | Description |
---|---|---|
container | HTMLElement | Parent DOM container. |
Returns
void
Inherited from
ModeExtensionBase.modeIconRender
restoreState
▸ restoreState(): void
Restore extension state from the local storage.
Returns
void
Inherited from
ModeExtensionBase.restoreState
restoreTooltipState
▸ restoreTooltipState(): void
Restore enableTooltip state from local storage.
Returns
void
Inherited from
ModeExtensionBase.restoreTooltipState
saveState
▸ saveState(): void
Save extension state in the local storage.
Returns
void
Inherited from
saveTooltipState
▸ saveTooltipState(): void
Save enableTooltip state to local storage.
Returns
void
Inherited from
ModeExtensionBase.saveTooltipState
setData
▸ setData(elNums
, resourceArray
, details
, forceClearData?
): void
Set data to resource array and details array for elements list.
Parameters
Name | Type | Description |
---|---|---|
elNums | number [] | Elements self Ids. |
resourceArray | any [] | Resource data array. |
details | any | Details data array. |
forceClearData? | boolean | force clear data after applying by extension. |
Returns
void
Inherited from
setRestoreStateHandler
▸ setRestoreStateHandler(handler
): this
Sets external hook handler for restoring extension state in the local storage.
Parameters
Name | Type | Description |
---|---|---|
handler | Function | handler hook function. |
Returns
this
Inherited from
ModeExtensionBase.setRestoreStateHandler
setRestoreTooltipStateHandler
▸ setRestoreTooltipStateHandler(handler
): this
Sets external hook handler for restoring extension tooltip state in the local storage.
Parameters
Name | Type | Description |
---|---|---|
handler | Function | handler hook function. |
Returns
this
Inherited from
ModeExtensionBase.setRestoreTooltipStateHandler
setSaveStateHandler
▸ setSaveStateHandler(handler
): this
Sets external hook handler for storing extension state in the local storage.
Parameters
Name | Type | Description |
---|---|---|
handler | Function | handler hook function. |
Returns
this
Inherited from
ModeExtensionBase.setSaveStateHandler
setSaveTooltipStateHandler
▸ setSaveTooltipStateHandler(handler
): this
Sets external hook handler for storing extension tooltip state in the local storage.
Parameters
Name | Type | Description |
---|---|---|
handler | Function | handler hook function. |
Returns
this
Inherited from
ModeExtensionBase.setSaveTooltipStateHandler
Hooks
commandChanged
▸ commandChanged(newCommand
): void
Hook when current extension command is changed or finished. Called by ExtensionManager.setCurrentCommandExtension().
Parameters
Name | Type |
---|---|
newCommand | ExtensionBase |
Returns
void
Inherited from
ModeExtensionBase.commandChanged
dedicatedToolbarRender
▸ dedicatedToolbarRender(container
): void
Render function for rendering dedicated toolbar content.
Parameters
Name | Type | Description |
---|---|---|
container | HTMLElement | Parent DOM container. |
Returns
void
Inherited from
ModeExtensionBase.dedicatedToolbarRender
uiRender
▸ uiRender(container
): void
Render function for rendering additional UI above viewer canvas.
Parameters
Name | Type | Description |
---|---|---|
container | HTMLElement | Parent DOM container. |
Returns
void