Skip to content

editor / isValidFreeShape

Function: isValidFreeShape() ​

isValidFreeShape(shape): boolean

Defined in: model/is-valid-free-shape.ts:19

Whether a free shape can enter the model (ADR-0032, ADR-0033): width and height finite and ≥ 0 (Q15; fractional as a conversion or an edit of its points leaves them, Q27), the points of its corners allowed (areFreeShapePoints), their radii integers ≥ 0 (ADR-0029), an angle from 0 to 359 and a finite position, fractional when an edit leaves it so (ADR-0035).

Parameters ​

shape ​

FreeShape

corners, width and height to check

Returns ​

boolean

true when every value is allowed

Kind ​

domain

See ​

docs/domain/shapes.md#rectangle