|
@@ -8,7 +8,7 @@ import { ICompKeys, Layout } from "../../typings";
|
|
|
|
|
|
export const editActions = EditorModule.action({
|
|
export const editActions = EditorModule.action({
|
|
|
|
|
|
- pickComp(compId: string) {
|
|
|
|
|
|
+ pickComp(compId: string, selected = true) {
|
|
if (compId == "") {//空的时候,就选择根页面
|
|
if (compId == "") {//空的时候,就选择根页面
|
|
compId = "root";
|
|
compId = "root";
|
|
}
|
|
}
|
|
@@ -26,13 +26,12 @@ export const editActions = EditorModule.action({
|
|
}
|
|
}
|
|
|
|
|
|
if (this.store.currCompId == compId) {
|
|
if (this.store.currCompId == compId) {
|
|
- //this.controls.selectCtrl.upgateGizmoStyle();
|
|
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
this.store.setCurrComp(compId);
|
|
this.store.setCurrComp(compId);
|
|
-
|
|
|
|
- selectCardChild(compId);
|
|
|
|
|
|
+ if (selected) {
|
|
|
|
+ selectCardChild(compId);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
@@ -84,8 +83,8 @@ export const editActions = EditorModule.action({
|
|
const obj = new CompObject(currComp)
|
|
const obj = new CompObject(currComp)
|
|
obj.worldTransform.translate(xOffset, yOffset);
|
|
obj.worldTransform.translate(xOffset, yOffset);
|
|
currComp.layout.transformMatrix = obj.worldTransform.getMatrixStr();
|
|
currComp.layout.transformMatrix = obj.worldTransform.getMatrixStr();
|
|
|
|
+
|
|
this.actions.pickComp(compId)
|
|
this.actions.pickComp(compId)
|
|
-
|
|
|
|
this.helper.extendStreamCard(currCard.id);
|
|
this.helper.extendStreamCard(currCard.id);
|
|
|
|
|
|
if (compKey == "Text") {
|
|
if (compKey == "Text") {
|
|
@@ -107,7 +106,13 @@ export const editActions = EditorModule.action({
|
|
this.helper.designSizeToPx(375 - (currComp.layout.size?.[0] || 750) / 2),
|
|
this.helper.designSizeToPx(375 - (currComp.layout.size?.[0] || 750) / 2),
|
|
cardPoints.y
|
|
cardPoints.y
|
|
);
|
|
);
|
|
|
|
+
|
|
this.helper.extendStreamCard(this.store.currStreamCardId);
|
|
this.helper.extendStreamCard(this.store.currStreamCardId);
|
|
|
|
+
|
|
|
|
+ if (compKey == "Text") {
|
|
|
|
+ this.actions.selectObjs([]);
|
|
|
|
+ this.actions.textFocus(currComp.id, true);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
async selectObjs(ids: string[]) {
|
|
async selectObjs(ids: string[]) {
|