Skip to content

editor / edgeOfSelection

Function: edgeOfSelection() ​

edgeOfSelection(selected, count): number | undefined

Defined in: model/edge-of-selection.ts:25

Edge between two neighbouring points selected: its number is the one of its first point in contour order, the edge closing the contour (from the last point to the first) being the last.

Parameters ​

selected ​

readonly number[]

numbers of the points selected, from 0

count ​

number

number of points of the shape

Returns ​

number | undefined

the number of the edge, undefined unless exactly two distinct neighbouring points of the shape (whole numbers from 0 to count − 1) are selected

Kind ​

domain

See ​

docs/domain/interaction.md#_3-node-editing