MCPcopy
hub / github.com/tldraw/tldraw / getSelectedShapes

Method getSelectedShapes

packages/editor/src/lib/editor/Editor.ts:2051–2053  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2049 * @readonly
2050 */
2051 @computed getSelectedShapes(): TLShape[] {
2052 return compact(this.getSelectedShapeIds().map((id) => this.store.get(id)))
2053 }
2054
2055 /**
2056 * Select one or more shapes.

Callers 15

selectFirstChildShapeMethod · 0.95
getOnlySelectedShapeMethod · 0.95
onKeyDownMethod · 0.80
onKeyRepeatMethod · 0.80

Calls 3

getSelectedShapeIdsMethod · 0.95
compactFunction · 0.90
getMethod · 0.65

Tested by 5

dragCreateFrameFunction · 0.64
dragCreateRectFunction · 0.64
dragCreateLineFunction · 0.64
getSelectedShapeColorFunction · 0.64
getTextFunction · 0.64