Skip to main content

Tooltip

A sub namespace of UI, exclusive for tooltip operations

//accessing to ui.tooltip methodsSW.UI.Tooltip.{methodName}

set#

Description#

This method can be used to set a new tooltip to a html element.

Method(s)#

1   function set(reference: HTMLElement, data: object | string,2       params: {3           documentName?: DocumentName,4           tooltipOptions?: PopperContentOptions5       } = {}6   ): void
ParameterTypeRequiredDefaultsDescription
referenceHTMLElementtrueElement's reference
dataobject | stringtrueData to be displayed
documentNameDocumentNamefalseDocument name
tooltipOptionsPopperContentOptionsfalseTooltip options

Basic Usage#

SW.UI.Tooltip.set(element, jobData, { documentName: SW.DocumentName.Job });

show#

Description#

This method can be used to show a tooptip in a html element. (When used, to hide the tooltip use SW.UI.Tooltip.hide())

Method(s)#

1   function show(reference: HTMLElement, data: object | string,2       params: {3           documentName?: DocumentName,4           tooltipOptions?: PopperContentOptions5       } = {}6   ): void
ParameterTypeRequiredDefaultsDescription
referenceHTMLElementtrueElement's reference
dataobject | stringtrueData to be displayed
documentNameDocumentNamefalseDocument name
tooltipOptionsPopperContentOptionsfalseTooltip options

Basic Usage#

SW.UI.Tooltip.(element, jobData, { documentName: SW.DocumentName.Job });

hide#

Description#

This method can be used to hide a tooltip. (Only used when using SW.UI.Tooltip.show())

Method(s)#

1 function hide(reference: HTMLElement): void
ParameterTypeRequiredDefaultsDescription
referenceHTMLElementtrueElement's reference

Basic Usage#

SW.UI.tooltip.hide(element);