Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
createErrorAnnotations
Method · 0.95
selectFirstChildShape
Method · 0.95
getOnlySelectedShape
Method · 0.95
_getSelectionSharedStyles
Method · 0.95
setOpacityForSelectedShapes
Method · 0.95
setStyleForSelectedShapes
Method · 0.95
putContentOntoCurrentPage
Method · 0.95
_notifyInteractionStart
Method · 0.80
getCurrentCommonAncestor
Method · 0.80
centerSelectionAroundPoint
Function · 0.80
onKeyDown
Method · 0.80
onKeyRepeat
Method · 0.80
Calls
3
getSelectedShapeIds
Method · 0.95
compact
Function · 0.90
get
Method · 0.65
Tested by
5
dragCreateFrame
Function · 0.64
dragCreateRect
Function · 0.64
dragCreateLine
Function · 0.64
getSelectedShapeColor
Function · 0.64
getText
Function · 0.64