move group select logic to action

taha/groupshapes-actions
Taha 2024-05-03 12:36:33 +01:00
rodzic c308cc2edd
commit 0e07c7956b
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -6632,7 +6632,6 @@ export class Editor extends EventEmitter<TLEventMap> {
},
])
this.reparentShapes(sortedShapeIds, groupId)
this.select(groupId)
})
return this

Wyświetl plik

@ -560,7 +560,9 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
editor.ungroupShapes(editor.getSelectedShapeIds())
} else {
editor.mark('group')
editor.groupShapes(editor.getSelectedShapeIds())
const groupId = createShapeId()
editor.groupShapes(editor.getSelectedShapeIds(), groupId)
editor.select(groupId)
}
},
},