Skip to main content
Version: 4.3

selectElementSize()

function selectElementSize(element): Size;

Selects an element's bounding-box size { width, height }. A subscribed component re-renders only when the element is resized.

Parameters

ParameterTypeDescription
elementInternalElementRecord<unknown>the resolved element record

Returns

Size

Example

import { useCell, selectElementSize } from '@joint/react';

const { width, height } = useCell(elementId, selectElementSize);

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub