ControlPanel | Data Inspector Library API Reference
- Last UpdatedMay 7, 2025
- 7 minute read
Hierarchy
-
WidgetAbstract<ControlPanelProps, ControlPanelState>
- ControlPanel
Index
Constructors
Properties
Accessors
Methods
- add
Scroll Listener - add
Section - bubble
Event - component
Did Mount - component
Did Unmount - component
Did Update - create
Element - create
Element Id - get
Element - handle
Sections Visibility - hide
- locale
Changed Handler - mount
Component - plugin
Editor Hide Handler - plugin
Editor Show Handler - remove
Scroll Listener - render
- reset
Element - reset
Width - set
State - set
Width - show
- unmount
Component - update
Component
Constructors
constructor
-
Parameters
-
props: ControlPanelProps
-
container: HTMLElement
-
state: ControlPanelState = ...
-
autoRender: boolean = true
-
Optional eventListeners: {}
-
[key: string]: (event: THREE.Event) => void
-
-
Parameters
-
event: THREE.Event
Returns void
-
-
-
-
Returns ControlPanel
-
Properties
container
dataControlSectionName
The name of the widget section that contains data controls (such as SdiiControls or RibControls).
Protected m_boundLocaleChanged
Protected m_element
The HTML element rendered by a widget.
Protected m_listenerHandlers
An array of created listener handlers that have to be removed by the componentDidUnmount method.
Protected m_storageKey
A key that is used to store some properties in the session storage. It can be configured over ControlPanelProps.storageKey. Properties that are stored:
- [[ControlPanelProps.displayMode]]
Readonly props
Readonly Static EVENT_AFTER_MOUNT
This event is fired when a component is mounted.
Readonly Static EVENT_AFTER_UPDATE
This event is fired when a component is updated.
Readonly Static EVENT_BEFORE_DESTROY
This event is fired on children when they are replaced.
Accessors
elementCurrentWidth
-
Returns current value of ControlPanel's width in pixels.
Returns number
minWidth
-
Returns minimal allowed value for ControlPanel's width in pixels.
Returns number
resizeHandle
-
Returns an instance of the resize handler widget.
Returns undefined | HorizontalResizeHandle
state
-
The current state of a widget.
Returns StateType
storageKey
-
Returns a key that is used to store some properties in SessionStorage. Used by the toolbar button to remember the user's choice.
Returns string
Methods
addScrollListener
-
Adds scroll listener for ControlPanel.
Parameters
-
ds: string
-
newListener: () => void
-
-
Returns void
-
-
Returns void
-
addSection
-
Adds a widget section to the control panel.
Parameters
-
sectionOptions: ControlPanelSectionProps & CollapsibleWidgetState
The widget section options.
-
Optional position: number
A position of the widget section.
Returns void
-
Protected bubbleEvent
-
Bubbles up an event.
Parameters
-
event: Event
An event.
Returns void
-
componentDidMount
-
Returns void
Protected componentDidUnmount
-
Returns void
Protected componentDidUpdate
-
Returns void
Protected createElement
-
Creates an HTML element and initializes it with provided properties.
Type parameters
-
K: "object" | "select" | "input" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "dir" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "font" | "footer" | "form" | "frame" | "frameset" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "marquee" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "slot" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "tbody" | "td" | "template" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr"
Parameters
-
tagName: K
The tag name of a new element.
-
Optional elementAttributes: any
An object that contains new element properties.
-
Optional className: string
The CSS class name.
Returns HTMLElementTagNameMap[K]
An HTML element.
-
Protected createElementId
-
Returns a unique identifier used for those DOM elements that don't have a defined
id
property, but which is required to remove event listeners.Returns string
getElement
-
Returns the HTML element rendered by a widget.
Returns HTMLElement
handleSectionsVisibility
-
Updates visibility of added sections.
Parameters
-
activeMode: VisibilityModes
The active mode.
Returns void
-
hide
-
Returns void
Protected localeChangedHandler
-
Handler of locale changed event.
Returns void
mountComponent
-
Mounts a component to the DOM.
Returns void
pluginEditorHideHandler
-
Sets width of ControlPanel to stored value.
Returns void
pluginEditorShowHandler
-
Sets width of ControlPanel to stored value.
Returns void
removeScrollListener
-
Removes scroll listener for ControlPanel.
Parameters
-
ds: string
Returns void
-
render
-
Returns HTMLElement
Protected resetElement
-
Resets the HTML element to create it from scratch and not to update the existing one.
Returns void
resetWidth
-
Resets
width
andminWidth
of the widget element to default values specified in the CSS.Returns void
setState
-
Sets a new state for a component.
Parameters
-
state: ControlPanelState
Returns void
-
setWidth
-
Updates width and minimum width of the control panel element.
Parameters
-
width: number
New width for the control panel element.
-
Optional minWidth: number
New minimum width for the control panel element.
Returns void
-
show
-
Returns void
Protected unmountComponent
-
Unmounts a component.
Returns void
updateComponent
-
Updates a component.
Returns void
In This Article
- Hierarchy
- Index
- Constructors
- Properties
- Accessors
- Methods
- addScrollListener
- addSection
- Protected bubbleEvent
- componentDidMount
- Protected componentDidUnmount
- Protected componentDidUpdate
- Protected createElement
- Protected createElementId
- getElement
- handleSectionsVisibility
- hide
- Protected localeChangedHandler
- mountComponent
- pluginEditorHideHandler
- pluginEditorShowHandler
- removeScrollListener
- render
- Protected resetElement
- resetWidth
- setState
- setWidth
- show
- Protected unmountComponent
- updateComponent
- addScrollListener
- Legend
A UI element to serve as a container for other widgets.