|
@@ -5,8 +5,16 @@ import { CompObject } from "../../controllers/SelectCtrl/compObj";
|
|
|
|
|
|
export const manualActions = EditorModule.action({
|
|
|
pickComp(compId: string) {
|
|
|
- if (this.store.currCompId == compId) return;
|
|
|
-
|
|
|
+ if (this.store.currCompId == compId) {
|
|
|
+ if (this.controls.selectCtrl.selected.length < 1 ) {
|
|
|
+ const paths = this.helper.getCompTrees(compId)
|
|
|
+ const cardChilds = paths[2];
|
|
|
+ if (cardChilds) {
|
|
|
+ this.controls.selectCtrl.selecteObjs([new CompObject(cardChilds)]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
const { historyCtrl } = this.controls;
|
|
|
const isActionRoot = !historyCtrl.historyActionDoing;
|
|
|
|
|
@@ -15,7 +23,7 @@ export const manualActions = EditorModule.action({
|
|
|
this.store.setCurrComp(compId);
|
|
|
historyCtrl.historyCombine = false;
|
|
|
if (isActionRoot) historyCtrl.historyActionDoing = false;
|
|
|
-
|
|
|
+
|
|
|
const paths = this.helper.getCompTrees(compId)
|
|
|
const cardChilds = paths[2];
|
|
|
if (cardChilds) {
|