Bladeren bron

Update 'src/app/core/models/application/actions/action-manager.js'

Some fixes to allow the MidPoint creation through GEO file with the correct ID
(e.g. one with "1:3" was been created with ID=1)
Only added helpfull comments
leo 2 jaren geleden
bovenliggende
commit
a731beb470
1 gewijzigde bestanden met toevoegingen van 7 en 1 verwijderingen
  1. 7 1
      src/app/core/models/application/actions/action-manager.js

+ 7 - 1
src/app/core/models/application/actions/action-manager.js

@@ -16,17 +16,21 @@ import { browser } from "../../../application/browser";
 
 export class ActionManager {
 
+  // @calledby app/core/drawers/layer.js: constructor(id, konvaLayer): this.actionManager = new ActionManager();
   constructor () {
+    console.log("action-manager.js!constructor()"); //D console.trace();
     this.actions = [];
     }
 
   push (action) {
-    this.actions.push(action);
+    console.log("action-manager.js!push(action): action=" + JSON.stringify(action));
+    this.actions.push(action); // "action" is JSON like: {"id":2,"type":0,"definition":... ,"elementClass":0}
     }
 
   remove (genericObject) {
     const action = this.actions.find(action => action.genericObject == genericObject);
     const index = this.actions.indexOf(action);
+    console.log("action-manager.js!remove(genericObject): action=" + action + ", index=" + index);
     this.actions.splice(index, 1);
     }
 
@@ -35,10 +39,12 @@ export class ActionManager {
     }
 
   clear () {
+    console.log("action-manager.js!clear()");
     this.actions = [];
     }
 
   load (actions) {
+    console.log("action-manager.js!load(actions)");
     this.actions = actions;
     }