Tooltip
Defined in: map/tooltip.ts:4
A single shared, absolutely-positioned, pointer-events-none tooltip div in the
host. Created lazily on first show; default inline look unless a className is
given (then styling is entirely the caller’s). Always carries d3gl-tooltip.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Tooltip(
host,className?):Tooltip
Defined in: map/tooltip.ts:12
Parameters
Section titled “Parameters”HTMLElement
className?
Section titled “className?”string
Returns
Section titled “Returns”Tooltip
Methods
Section titled “Methods”destroy()
Section titled “destroy()”destroy():
void
Defined in: map/tooltip.ts:64
Returns
Section titled “Returns”void
hide()
Section titled “hide()”hide():
void
Defined in: map/tooltip.ts:61
Returns
Section titled “Returns”void
move()
Section titled “move()”move(
x,y):void
Defined in: map/tooltip.ts:50
Position near host-relative (x, y) with a 12px offset, clamped into the host. Reads host.clientWidth/clientHeight so the clamp tracks the CSS size correctly under responsive layouts where the host may differ from the engine’s logical size.
Parameters
Section titled “Parameters”number
number
Returns
Section titled “Returns”void
show()
Section titled “show()”show(
content):void
Defined in: map/tooltip.ts:35
Parameters
Section titled “Parameters”content
Section titled “content”string | HTMLElement
Returns
Section titled “Returns”void