소스 검색

Update 'src/app/core/models/objects/generic-object.js'

Fix ID numbering and read of GEO with 3 straight lines (not fineshed!)
* constructor (id): in "else", after "this.id = id;", was added
  identifier.setIdentifierNumber(id+1); // app/core/application/identifier.js: setIdentifierNumber(id): this.number = id;
leo 2 년 전
부모
커밋
4778543131
1개의 변경된 파일11개의 추가작업 그리고 5개의 파일을 삭제
  1. 11 5
      src/app/core/models/objects/generic-object.js

+ 11 - 5
src/app/core/models/objects/generic-object.js

@@ -1,12 +1,17 @@
+// iGeomJS
+// LInE
+
 import { identifier } from "../../application/identifier";
 
 export class GenericObject {
-  constructor(id) {
+
+  constructor (id) {
     if (id == undefined) {
-      this.id = identifier.next();
+      this.id = identifier.next(); // app/core/application/identifier.js: next(): return this.number++;
     } else {
       this.id = id;
-    }
+      identifier.setIdentifierNumber(id+1); // app/core/application/identifier.js: setIdentifierNumber(id): this.number = id;
+      }
     this.elementClass;
     this.label = "";
     this.labelIgeom = "";
@@ -16,5 +21,6 @@ export class GenericObject {
     this.defined = 1;
     this.color = -16776961;
     this.visible = true;
-  }
-}
+    }
+
+  }