Powered by Zoomin Software. For more details please contactZoomin

Data Inspector Library - API Reference

Product category
Technology
Doc type
Version
Product lifecycle
This publication

Data Inspector Library - API Reference: ControlPanel | Data Inspector Library API Reference

Table of Contents

ControlPanel | Data Inspector Library API Reference

A UI element to serve as a container for other widgets.

Hierarchy

Index

Constructors

constructor

  • inheritdoc

    Parameters

    • props: ControlPanelProps
    • container: HTMLElement
    • state: ControlPanelState = ...
    • autoRender: boolean = true
    • Optional eventListeners: {}
      • [key: string]: (event: THREE.Event) => void
          • (event: THREE.Event): void
          • Parameters

            • event: THREE.Event

            Returns void

    Returns ControlPanel

Properties

container

container: HTMLElement

dataControlSectionName

dataControlSectionName: string = "DATA"

The name of the widget section that contains data controls (such as SdiiControls or RibControls).

Protected m_boundLocaleChanged

m_boundLocaleChanged: undefined | (() => void)

Protected m_element

m_element: undefined | HTMLElement

The HTML element rendered by a widget.

Protected m_listenerHandlers

m_listenerHandlers: { event: string; handler: EventListenerOrEventListenerObject; id: string }[] = ...

An array of created listener handlers that have to be removed by the componentDidUnmount method.

Protected m_storageKey

m_storageKey: string = "control-panel"

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

EVENT_AFTER_MOUNT: "aftermount" = "aftermount"

This event is fired when a component is mounted.

Readonly Static EVENT_AFTER_UPDATE

EVENT_AFTER_UPDATE: "afterupdate" = "afterupdate"

This event is fired when a component is updated.

Readonly Static EVENT_BEFORE_DESTROY

EVENT_BEFORE_DESTROY: "beforedestroy" = "beforedestroy"

This event is fired on children when they are replaced.

Accessors

elementCurrentWidth

  • get elementCurrentWidth(): number
  • Returns current value of ControlPanel's width in pixels.

    Returns number

minWidth

  • get minWidth(): number
  • 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

  • get state(): StateType
  • The current state of a widget.

    Returns StateType

storageKey

  • get storageKey(): string
  • 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

  • addScrollListener(ds: string, newListener: () => void): void
  • Adds scroll listener for ControlPanel.

    Parameters

    • ds: string
    • newListener: () => void
        • (): void
        • Returns void

    Returns void

addSection

  • Adds a widget section to the control panel.

    Parameters

    Returns void

Protected bubbleEvent

  • bubbleEvent(event: Event): void
  • Bubbles up an event.

    Parameters

    • event: Event

      An event.

    Returns void

componentDidMount

  • componentDidMount(): void

Protected componentDidUnmount

  • componentDidUnmount(): void

Protected componentDidUpdate

  • componentDidUpdate(): void

Protected createElement

  • createElement<K>(tagName: K, elementAttributes?: any, className?: string): HTMLElementTagNameMap[K]
  • 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

  • createElementId(): string
  • 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

  • getElement(): HTMLElement
  • Returns the HTML element rendered by a widget.

    Returns HTMLElement

handleSectionsVisibility

  • Updates visibility of added sections.

    Parameters

    Returns void

hide

  • hide(): void
  • inheritdoc

    Returns void

Protected localeChangedHandler

  • localeChangedHandler(): void

mountComponent

  • mountComponent(): void
  • Mounts a component to the DOM.

    Returns void

pluginEditorHideHandler

  • pluginEditorHideHandler(): void
  • Sets width of ControlPanel to stored value.

    Returns void

pluginEditorShowHandler

  • pluginEditorShowHandler(): void
  • Sets width of ControlPanel to stored value.

    Returns void

removeScrollListener

  • removeScrollListener(ds: string): void
  • Removes scroll listener for ControlPanel.

    Parameters

    • ds: string

    Returns void

render

  • render(): HTMLElement
  • inheritdoc

    Returns HTMLElement

Protected resetElement

  • resetElement(): void
  • Resets the HTML element to create it from scratch and not to update the existing one.

    Returns void

resetWidth

  • resetWidth(): void
  • Resets width and minWidth of the widget element to default values specified in the CSS.

    Returns void

setState

setWidth

  • setWidth(width: number, minWidth?: number): void
  • 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

  • show(): void
  • inheritdoc

    Returns void

Protected unmountComponent

  • unmountComponent(): void
  • Unmounts a component.

    Returns void

updateComponent

  • updateComponent(): void
  • Updates a component.

    Returns void

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Class
  • Class with type parameter
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Interface
  • Interface with type parameter
  • Protected property
  • Protected method
  • Enumeration
Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert