Skip to main content

Home > @jsplumbtoolkit/browser-ui > Surface > floatElement

Surface.floatElement() method

Appends an element to the viewport so that it floats above the content that is being zoomed and panned. The element will have position:absolute set on it. You can float any element you like, but note that the responsibility for setting an appropriate z index is yours.

Signature:

floatElement(el: Element, pos: PointXY): void;

Parameters

ParameterTypeDescription
elElementElement to float.
posPointXYPosition to float the element at.

Returns:

void