Ver Fonte

fix: correção do componente de deleção dos componentes.

Victor Luiz Domingues há 1 ano atrás
pai
commit
9e129f0aa3

+ 3 - 2
src/app/components/trash-component/drawers/trash-drawer.js

@@ -10,7 +10,7 @@ export class TrashDrawer extends SelectableDrawer {
   }
 
   draw(e) {
-    const objects = Objects.getSelectedObjects();
+    const objects = [...Objects.getSelectedObjects()];
     objects.forEach(aggregator => {
       this.delete(aggregator);
     });
@@ -21,7 +21,9 @@ export class TrashDrawer extends SelectableDrawer {
   delete(aggregator) {
 
     Objects.removeAggregator(aggregator);
+
     aggregator.aggregators.forEach(dependenceAggregator => {
+
       this.delete(dependenceAggregator);
 
     });
@@ -30,7 +32,6 @@ export class TrashDrawer extends SelectableDrawer {
   }
 
   update(aggregator, e) {
-
     return;
   }
 }

+ 1 - 0
src/app/core/drawers/layer.js

@@ -42,6 +42,7 @@ export class Layer {
     }
   }
   removeAggregator(aggregator) {
+    console.info("aggregator", aggregator);
     let index = this.aggregators.indexOf(aggregator);
     this.aggregators.splice(index, 1);
     if (this.selectedAggregators.includes(aggregator)) {