|
@@ -326,8 +326,14 @@ export const editActions = EditorModule.action({
|
|
|
},
|
|
|
|
|
|
ctrlc() {
|
|
|
- // console.log("contrc ", this.store.selected);
|
|
|
- ctrlState.selected = this.store.selected.slice(0);
|
|
|
+ ctrlState.selected = [];
|
|
|
+ const children = this.store.currStreamCard.children.default || [];
|
|
|
+ children.forEach(c=>{
|
|
|
+ if (this.store.selected.indexOf(c) > -1) {
|
|
|
+ ctrlState.selected.push(c);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
ctrlState.cardId = this.store.currStreamCardId;
|
|
|
ctrlState.type = 1;
|
|
|
const objc = this.controls.selectCtrl.objContainer as ObjsContainer;
|
|
@@ -390,7 +396,16 @@ export const editActions = EditorModule.action({
|
|
|
ctrlx() {
|
|
|
//console.log("ctrlv ", this.store.selected);
|
|
|
//console.log("ctrlv ", this.store.selected);
|
|
|
- ctrlState.selected = this.store.selected.slice(0);
|
|
|
+
|
|
|
+ //保持图层顺序
|
|
|
+ ctrlState.selected = [];
|
|
|
+ const children = this.store.currStreamCard.children.default || [];
|
|
|
+ children.forEach(c=>{
|
|
|
+ if (this.store.selected.indexOf(c) > -1) {
|
|
|
+ ctrlState.selected.push(c);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
ctrlState.cardId = this.store.currStreamCardId;
|
|
|
ctrlState.type = 2;
|
|
|
|
|
@@ -435,8 +450,8 @@ export const editActions = EditorModule.action({
|
|
|
|
|
|
deepCopy(cp);
|
|
|
});
|
|
|
-
|
|
|
this.actions.addComps(news);
|
|
|
+
|
|
|
this.actions.selectObjs(news);
|
|
|
|
|
|
setTimeout(() => {
|
|
@@ -606,7 +621,7 @@ export const editActions = EditorModule.action({
|
|
|
async saveDesign() {
|
|
|
try {
|
|
|
// 清除无用组件
|
|
|
- this.helper.clearUnusedComps(this.store.designData.compMap);
|
|
|
+ this.helper.clearProjectUnusedComps(this.store.designData.compMap);
|
|
|
const c = this.controls.screenCtrl;
|
|
|
c.saveScreenPage();
|
|
|
const root = this.helper.findRootComp() as DesignComp;
|