Skip to content

@fabwcie/free-drawing / utils/order / reorderShapes

Function: reorderShapes() ​

reorderShapes(shapes, order): boolean

Defined in: packages/free-drawing/src/utils/order.ts:14

Move shapes in stacking order of their layer, relative order of moved shapes is kept. forward / backward: above / below the next shape they overlap (moving past other shapes changes nothing), front / back: above / below all shapes

Parameters ​

shapes ​

Node<NodeConfig>[]

top nodes to move (selection), children of the same parent; shapes without parent ignored

order ​

ShapeOrder

where to move them

Returns ​

boolean

true if a shape moved