Skip to main content

DecorateParams

DecorateParams = object

Parameters for a decorator. These are the parameters that are passed in to a Decorator's decorate method when it is called.

Properties

fixElement()

fixElement: (el, pos, constraints?, id?) => FixedElement

A method you can use to place some element at a fixed position relative to the origin of the surface's viewport. The element will remain fixed in that position if the surface is zoomed or panned.

Parameters

el

BrowserElement

Element to place

pos

PointXY

Position relative to the canvas origin to place the element.

constraints?

FixedElementConstraints

id?

string

Returns

FixedElement


layout

layout: AbstractLayout<any>

The surface's current layout


setAbsolutePosition()

setAbsolutePosition: (el, xy) => void

A method you can use to set the absolute position of some element.

Parameters

el

BrowserElement

xy

PointXY

Returns

void


surface

surface: Surface

The underlying Surface