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
Parameter | Type | Description |
---|---|---|
el | Element | The DOM element to append. |
constraints | FixedElementConstraints | Flags to indicate optional constraint to each axis. |
pos | PointXY | Location of the element's origin. |
Returns:
void