Browse Source

修正 框选无法全部删除

develop
徐振升 4 years ago
parent
commit
0ed23a618b
  1. 31
      src/app/working-area/working-area.component.ts

31
src/app/working-area/working-area.component.ts

@ -159,24 +159,23 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.selection.objects.forEach(item => {
if (this.allowEdit
&& this.canvasData.gameMode === item.assetData.GameMode) {
console.log(this.canvasData.gameMode);
switch (this.canvasData.gameMode) {
case 0:
delete this.canvasData.originaleveryStoreyData.data[item.assetData.Id];
this.backgroundImage.removeChild(this.backgroundImage.getChildByName(item.assetData.Id));
this.canvasData.isChange = true;
break;
case 1:
delete this.canvasData.selectPanelPoint.Data.DefinedIncrement[item.assetData.Id];
delete this.canvasData.selectPanelPoint.Data.Increment[item.assetData.Id];
delete this.canvasData.selectPanelPoint.Data.Stock[item.assetData.Id];
this.backgroundImage.removeChild(this.backgroundImage.getChildByName(item.assetData.Id));
this.canvasData.isChange = true;
break;
switch (this.canvasData.gameMode) {
case 0:
delete this.canvasData.originaleveryStoreyData.data[item.assetData.Id];
this.backgroundImage.removeChild(this.backgroundImage.getChildByName(item.assetData.Id));
this.canvasData.isChange = true;
break;
case 1:
delete this.canvasData.selectPanelPoint.Data.DefinedIncrement[item.assetData.Id];
delete this.canvasData.selectPanelPoint.Data.Increment[item.assetData.Id];
delete this.canvasData.selectPanelPoint.Data.Stock[item.assetData.Id];
this.backgroundImage.removeChild(this.backgroundImage.getChildByName(item.assetData.Id));
this.canvasData.isChange = true;
break;
}
this.selection.deselectAll();
}
}
});
this.selection.deselectAll();
this.emit('deleteIcon');
}
});

Loading…
Cancel
Save