Skip to main content

Interface: IBoundedElement

Defined in: packages/blockly/core/interfaces/i_bounded_element.ts:14

A bounded element interface.

Extended by​

Methods index​

MethodDescription
getBoundingRectangleReturns the coordinates of a bounded element describing the dimensions of the element. Coordinate system: workspace coordinates.
moveByMove the element by a relative offset.

Methods​

getBoundingRectangle()​

getBoundingRectangle(): Rect;

Defined in: packages/blockly/core/interfaces/i_bounded_element.ts:21

Returns the coordinates of a bounded element describing the dimensions of the element. Coordinate system: workspace coordinates.

Returns​

Rect

Object with coordinates of the bounded element.


moveBy()​

moveBy(
dx,
dy,
reason?
): void;

Defined in: packages/blockly/core/interfaces/i_bounded_element.ts:30

Move the element by a relative offset.

Parameters​

ParameterTypeDescription
dxnumberHorizontal offset in workspace units.
dynumberVertical offset in workspace units.
reason?string[]Why is this move happening? 'user', 'bump', 'snap'...

Returns​

void