()
| 2399 | } |
| 2400 | |
| 2401 | selectFirstChildShape() { |
| 2402 | const selectedShapes = this.getSelectedShapes() |
| 2403 | if (!selectedShapes.length) return |
| 2404 | const selectedShape = selectedShapes[0] |
| 2405 | const children = this.getSortedChildIdsForParent(selectedShape.id) |
| 2406 | .map((id) => this.getShape(id)) |
| 2407 | .filter((i) => i) as TLShape[] |
| 2408 | const sortedChildren = this._getShapesInReadingOrder(children) |
| 2409 | if (sortedChildren.length === 0) return |
| 2410 | this._selectShapesAndZoom([sortedChildren[0].id]) |
| 2411 | } |
| 2412 | |
| 2413 | private _selectShapesAndZoom(ids: TLShapeId[]) { |
| 2414 | this.setSelectedShapes(ids) |
no test coverage detected