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:1201


calcWidths()

static private calcWidths(form): void

Parameters

ParameterType
formHTMLElement

Returns

void

Source

ui.ts:1274


createElementFromHtml()

static createElementFromHtml(htmlString): HTMLDivElement

Parameters

ParameterType
htmlStringstring

Returns

HTMLDivElement

Source

ui.ts:1182


getFormId()

static private getFormId(form): string

Parameters

ParameterType
formHTMLElement

Returns

string

Source

ui.ts:1323


getInputsMinWidths()

static private getInputsMinWidths(form): number[]

Parameters

ParameterType
formHTMLElement

Returns

number[]

Source

ui.ts:1350


getLabelWidth()

static private getLabelWidth(element): number

Parameters

ParameterType
elementHTMLElement

Returns

number

Source

ui.ts:1441


getLabelsWidths()

static private getLabelsWidths(tempForm): number[]

Parameters

ParameterType
tempFormHTMLElement

Returns

number[]

Source

ui.ts:1413


getOptionsWidth()

static private getOptionsWidth(element): number

Parameters

ParameterType
elementHTMLElement

Returns

number

Source

ui.ts:1425


handleFormResize()

static private handleFormResize(form): boolean

Parameters

ParameterType
formHTMLElement

Returns

boolean

Source

ui.ts:1286


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:1171


initFormulaAccelerators()

static initFormulaAccelerators(textInput, table): void

Parameters

ParameterType
textInputInputBase<any>
tableDataFrame

Returns

void

Source

ui.ts:1214


parseHtml()

static parseHtml(html): HTMLElement

Parameters

ParameterType
htmlstring

Returns

HTMLElement

Source

ui.ts:1208


resizeFormLabels()

static resizeFormLabels(form): void

Parameters

ParameterType
formHTMLElement

Returns

void

Source

ui.ts:1329


scrollIntoViewIfNeeded()

static scrollIntoViewIfNeeded(e): void

Parameters

ParameterType
eHTMLElement

Returns

void

Source

ui.ts:1454


sendKeyboardEvent()

static sendKeyboardEvent(el, keyCode): void

Parameters

ParameterType
elHTMLElement
keyCodenumber

Returns

void

Source

ui.ts:1188


setHoverVisibility()

static setHoverVisibility(host, items): void

Parameters

ParameterType
hostHTMLElement
itemsHTMLElement[]

Returns

void

Source

ui.ts:1178


setLabelsWidth()

static private setLabelsWidth(form, w): void

Parameters

ParameterType
formHTMLElement
wnumber

Returns

void

Source

ui.ts:1262


waitForElementInDom()

static waitForElementInDom(element): Promise<HTMLElement>

Waits until the specified element is in the DOM.

Parameters

ParameterType
elementHTMLElement

Returns

Promise<HTMLElement>

Source

ui.ts:1219