getDroppedShapesToNewParents
See source codeGet the shapes that will be reparented to new parents when the shapes are dropped.
function getDroppedShapesToNewParents(
editor: Editor,
shapes: Set<TLShape> | TLShape[],
cb?: (shape: TLShape, parent: TLShape) => boolean
): {
remainingShapesToReparent: Set<TLShape>
reparenting: Map<TLShapeId, TLShape[]>
}
Parameters
Name | Description |
---|---|
| The editor instance. |
| The shapes to check. |
| A callback to filter out certain shapes. |
Returns
An object with the shapes that will be reparented to new parents and the shapes that will be reparented to the page or their ancestral group.
Prev
getDefaultCdnBaseUrlNext
getFontsFromRichText