@mocanvas/editor · function

deselect

declare function deselect(editor: Editor, ids: readonly (ShapeId | UnknownShape)[]): void

Remove shapes from the selection, leaving the rest of it alone.

The counterpart to select(), and not the same as setSelectedShapes() with a shorter list: a caller that only wants to drop one shape should not have to know what else is selected.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.