Skip to main content

tools

UI Tools *

Constructors

new tools()

new tools(): tools

Returns

tools

Properties

PropertyModifierTypeDefault value
formLabelMaxWidthsprivateWeakMap<HTMLElement, number>...
formLabelWidthsprivateWeakMap<HTMLElement, number[]>...
formMinInputWidthsprivateWeakMap<HTMLElement, number>...
formNumberprivatenumber0
formResizeObserverprivatenull | ResizeObserver...
mutationObserverprivatenull | MutationObservernull
mutationObserverElementsprivateobject[][]

Methods

bind()

static bind(e, onClick, tooltipMsg): HTMLElement

Initialized onClick and sets the tooltip for the element.

Parameters

ParameterTypeDefault value
eHTMLElementundefined
onClicknull | Functionnull
tooltipMsgnull | stringnull

Returns

HTMLElement

Source

ui.ts:1169


calcWidths()

static private calcWidths(form): void

Parameters

ParameterType
formHTMLElement

Returns

void

Source

ui.ts:1242


createElementFromHtml()

static createElementFromHtml(htmlString): HTMLDivElement

Parameters

ParameterType
htmlStringstring

Returns

HTMLDivElement

Source

ui.ts:1150


getFormId()

static private getFormId(form): string

Parameters

ParameterType
formHTMLElement

Returns

string

Source

ui.ts:1291


getInputsMinWidths()

static private getInputsMinWidths(form): number[]

Parameters

ParameterType
formHTMLElement

Returns

number[]

Source

ui.ts:1318


getLabelWidth()

static private getLabelWidth(element): number

Parameters

ParameterType
elementHTMLElement

Returns

number

Source

ui.ts:1409


getLabelsWidths()

static private getLabelsWidths(tempForm): number[]

Parameters

ParameterType
tempFormHTMLElement

Returns

number[]

Source

ui.ts:1381


getOptionsWidth()

static private getOptionsWidth(element): number

Parameters

ParameterType
elementHTMLElement

Returns

number

Source

ui.ts:1393


handleFormResize()

static private handleFormResize(form): boolean

Parameters

ParameterType
formHTMLElement

Returns

boolean

Source

ui.ts:1254


handleResize()

static handleResize(element, onChanged): () => void

Finds entities (such as "CHEMBL25") in the specified html element, and converts them to hyperlinks

Parameters

ParameterType
elementHTMLElement
onChanged(width, height) => void

Returns

Function

Returns

void

Source

ui.ts:1139


initFormulaAccelerators()

static initFormulaAccelerators(textInput, table): void

Parameters

ParameterType
textInputInputBase<any>
tableDataFrame

Returns

void

Source

ui.ts:1182


parseHtml()

static parseHtml(html): HTMLElement

Parameters

ParameterType
htmlstring

Returns

HTMLElement

Source

ui.ts:1176


resizeFormLabels()

static resizeFormLabels(form): void

Parameters

ParameterType
formHTMLElement

Returns

void

Source

ui.ts:1297


scrollIntoViewIfNeeded()

static scrollIntoViewIfNeeded(e): void

Parameters

ParameterType
eHTMLElement

Returns

void

Source

ui.ts:1422


sendKeyboardEvent()

static sendKeyboardEvent(el, keyCode): void

Parameters

ParameterType
elHTMLElement
keyCodenumber

Returns

void

Source

ui.ts:1156


setHoverVisibility()

static setHoverVisibility(host, items): void

Parameters

ParameterType
hostHTMLElement
itemsHTMLElement[]

Returns

void

Source

ui.ts:1146


setLabelsWidth()

static private setLabelsWidth(form, w): void

Parameters

ParameterType
formHTMLElement
wnumber

Returns

void

Source

ui.ts:1230


waitForElementInDom()

static waitForElementInDom(element): Promise<HTMLElement>

Waits until the specified element is in the DOM.

Parameters

ParameterType
elementHTMLElement

Returns

Promise<HTMLElement>

Source

ui.ts:1187