kickoutOccludedShapes

See source code

Reparents shapes that are no longer contained within their parent shapes. todo: rename me to something more descriptive, like reparentOccludedShapes or reparentAutoDroppedShapes

function kickoutOccludedShapes(
  editor: Editor,
  shapeIds: TLShapeId[],
  opts?: {
    filter?(parent: TLShape): boolean
  }
): void

Parameters

NameDescription

editor

The editor instance.

shapeIds

The IDs of the shapes to reparent.

opts

{
  filter?(parent: TLShape): boolean
}

Optional options, including a callback to filter out certain parents, such as when removing a frame.

Returns

void
Prev
isSafeFloat
Next
linesIntersect