Skip to content

editor / freeShapeKeptInPlace

Function: freeShapeKeptInPlace() ​

freeShapeKeptInPlace(shape, drawn, kept): FreeShape

Defined in: model/free-shape-kept-in-place.ts:29

Free shape placed so that a point the edit did not move is drawn where it was (ADR-0035, DERIV-turned-shape step 5): an edit changes the box of a turned shape, hence its center, and the shape would jump otherwise. At 0° the shape is returned as it is, its box drawn where it is.

Parameters ​

shape ​

FreeShape

free shape after the edit, its box fitted around its straight points

drawn ​

readonly Corner[]

corners as drawn before the edit (turnedCorners)

kept ​

KeptPoint

the number of a point not moved, before and after the edit

Returns ​

FreeShape

the shape at the position that keeps that point in place

Kind ​

domain

See ​

DERIV-turned-shape