Tooltip | Data Inspector Library API Reference
- Last UpdatedMay 7, 2025
- 5 minute read
Hierarchy
-
WidgetAbstract<TooltipProps, {}>
- Tooltip
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Parameters
-
props: TooltipProps
-
container: HTMLElement
-
Optional state: {}
-
autoRender: boolean = true
-
Optional eventListeners: {}
-
[key: string]: (event: THREE.Event) => void
-
-
Parameters
-
event: THREE.Event
Returns void
-
-
-
-
Returns Tooltip
-
Properties
container
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.
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
state
-
The current state of a widget.
Returns StateType
Methods
Protected bubbleEvent
-
Bubbles up an event.
Parameters
-
event: Event
An event.
Returns void
-
Protected componentDidMount
-
Called after a component is mounted. Must only be called once.
Returns void | Promise<void>
Protected componentDidUnmount
-
Called after a component is unmounted. Must only be called once.
Returns void
Protected componentDidUpdate
-
Called after a component is updated. Must only be called once.
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
hide
-
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
-
Handler of locale changed event.
Returns void
mountComponent
-
Mounts a component to the DOM.
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
setClassName
-
Updates additional CSS class for tooltip.
Parameters
-
Optional className: string
Additional CSS class.
Returns void
-
setContent
-
Sets the content.
Parameters
-
content: string
The content inside the tooltip.
Returns void
-
setPosition
-
Sets position for the tooltip.
Parameters
-
x: number
X coordinate for the tooltip.
-
y: number
Y coordinate for the tooltip.
Returns void
-
setState
-
Sets a new state for a component.
Parameters
-
state: {}
Returns void
-
show
-
Shows a widget. It basically adds a class "hidden" to the root element.
Returns void
Protected unmountComponent
-
Unmounts a component.
Returns void
updateComponent
-
Updates a component.
Returns void
In This Article
- Hierarchy
- Index
- Constructors
- Properties
- Accessors
- Methods
- Protected bubbleEvent
- Protected componentDidMount
- Protected componentDidUnmount
- Protected componentDidUpdate
- Protected createElement
- Protected createElementId
- getElement
- hide
- Protected localeChangedHandler
- mountComponent
- render
- Protected resetElement
- setClassName
- setContent
- setPosition
- setState
- show
- Protected unmountComponent
- updateComponent
- Protected bubbleEvent
- Legend
A tooltip component. It is rendered with the
hidden
class by default.