|
@@ -27,7 +27,7 @@ export const editActions = EditorModule.action({
|
|
|
//点击默认都创建一个容器
|
|
|
//创建容器
|
|
|
const isCreatCard = compKey != "Text" && compKey != "Image" && compKey != "Video" && compKey != "Web3D";
|
|
|
-
|
|
|
+
|
|
|
let yOffset = 0;
|
|
|
if (this.store.currCompId != this.store.currStreamCardId && !isCreatCard) {
|
|
|
const bound = this.helper.getCardCompBound(this.store.currCompId);
|
|
@@ -126,10 +126,10 @@ export const editActions = EditorModule.action({
|
|
|
removeComp(compId: string) {
|
|
|
|
|
|
if (this.helper.isCompCanDelete(compId)) {
|
|
|
- if (compId === this.store.currCompId) {
|
|
|
- this.controls.selectCtrl.selecteObjs([]);
|
|
|
+ if (compId === this.store.currCompId) {
|
|
|
this.store.setCurrComp("root");
|
|
|
}
|
|
|
+ this.controls.selectCtrl.selecteObjs([]);
|
|
|
this.store.deleteComp(compId);
|
|
|
}
|
|
|
},
|
|
@@ -137,9 +137,10 @@ export const editActions = EditorModule.action({
|
|
|
async removeStreamCard(compId: string) {
|
|
|
await queenApi.showConfirm({ title: "删除", content: "确认删除当前内容?" });
|
|
|
|
|
|
- if (this.store.streamCardIds.length < 2) {
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (this.store.streamCardIds.length < 2) {
|
|
|
+ // queenApi.messageError("")
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
let nextCard = this.store.currStreamCardId;
|
|
|
if (compId == this.store.currStreamCardId) {
|
|
|
const i = this.store.streamCardIds.indexOf(compId);
|
|
@@ -148,7 +149,10 @@ export const editActions = EditorModule.action({
|
|
|
nextCard = this.store.streamCardIds[i - 1];
|
|
|
}
|
|
|
}
|
|
|
+ this.controls.selectCtrl.selecteObjs([])
|
|
|
+
|
|
|
this.store.deleteComp(compId);
|
|
|
+
|
|
|
this.store.setCurrComp(nextCard);
|
|
|
},
|
|
|
// 移动组件顺序
|