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: Tooltip | Data Inspector Library API Reference

Table of Contents

Tooltip | Data Inspector Library API Reference

A tooltip component. It is rendered with the hidden class by default.

Hierarchy

Index

Constructors

constructor

  • new Tooltip(props: TooltipProps, container: HTMLElement, state?: {}, autoRender?: boolean, eventListeners?: {}): Tooltip
  • inheritdoc

    Parameters

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

            • event: THREE.Event

            Returns void

    Returns Tooltip

Properties

container

container: HTMLElement

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.

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

state

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

    Returns StateType

Methods

Protected bubbleEvent

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

    Parameters

    • event: Event

      An event.

    Returns void

Protected componentDidMount

  • componentDidMount(): void | Promise<void>
  • Called after a component is mounted. Must only be called once.

    Returns void | Promise<void>

Protected componentDidUnmount

  • componentDidUnmount(): void
  • Called after a component is unmounted. Must only be called once.

    Returns void

Protected componentDidUpdate

  • componentDidUpdate(): void
  • Called after a component is updated. Must only be called once.

    Returns 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

hide

  • hide(event?: MouseEvent): void
  • Hides the tooltip.

    Parameters

    • Optional event: MouseEvent

      An optional mouse event not to hide the tooltip if the cursor is over the tooltip or its inner elements.

    Returns void

Protected localeChangedHandler

  • localeChangedHandler(): void

mountComponent

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

    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

setClassName

  • setClassName(className?: string): void
  • Updates additional CSS class for tooltip.

    Parameters

    • Optional className: string

      Additional CSS class.

    Returns void

setContent

  • setContent(content: string): void
  • Sets the content.

    Parameters

    • content: string

      The content inside the tooltip.

    Returns void

setPosition

  • setPosition(x: number, y: number): void
  • Sets position for the tooltip.

    Parameters

    • x: number

      X coordinate for the tooltip.

    • y: number

      Y coordinate for the tooltip.

    Returns void

setState

  • setState(state: {}): void
  • Sets a new state for a component.

    Parameters

    • state: {}

    Returns void

show

  • show(): void
  • Shows a widget. It basically adds a class "hidden" to the root element.

    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
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Interface
  • Interface with type parameter
  • Enumeration
Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert