Skip to main content

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

Surface.fixElement() method

Appends an element to the viewport such that it is zoomed with everything else, but constrains pan in one or both axes so that the element remains fixed with respect to the viewport origin.

Signature:

fixElement(el: Element, constraints: FixedElementConstraints, pos: PointXY): void;

Parameters

ParameterTypeDescription
elElementThe DOM element to append.
constraintsFixedElementConstraintsFlags to indicate optional constraint to each axis.
posPointXYLocation of the element's origin.

Returns:

void