Explorar o código

Update 'src/app/components/intersection-component/models/intersection-model.js'

Fixing midpoint object MiddlePoint: now constructing only one geometric object
Indentation adjusts: inserted space in all function/method declaration (before open parenthesis) to distinguish it from its use
Added one comment: // To be used in GEO file DEFINITION, see app/core/models/application/actions/action.js
leo %!s(int64=2) %!d(string=hai) anos
pai
achega
48628e5965

+ 4 - 3
src/app/components/intersection-component/models/intersection-model.js

@@ -31,7 +31,7 @@ export class IntersectionModel extends PointModel {
       this.color = -65536; // rgba(255,0,0,1)
       this.definitions = this.getDefinitions();
       this.backgroundColor = "#aa0000"; // setBackgroundColor(color)
-console.log("intersection-model.js: og1=" + og1.label +", og2=" + og2.label + ", this.color=" + this.color); // console.trace(); //leo
+      console.log("intersection-model.js: og1=" + og1.label +", og2=" + og2.label + ", this.color=" + this.color); // console.trace(); //leo //D
     } catch (e) { console.log("app/components/intersection-component/models/intersection-model.js: constructor(.): erro!\n" + e.stack); }
     }
 
@@ -77,10 +77,11 @@ console.log("intersection-model.js: og1=" + og1.label +", og2=" + og2.label + ",
     } catch (e) { console.log("app/components/intersection-component/models/intersection-model.js: update(aggregator, event): erro!"); }
     }
 
+  // To be used in GEO file DEFINITION, see app/core/models/application/actions/action.js
   getDefinitions () {
     try { //D //leo
       return [{ id: this.og1.id }, { id: this.og2.id }, { id: this.index + 1 }, { id: this.visible ? 1 : 0 }];
-    } catch (e) { console.log("app/components/intersection-component/models/intersection-model.js: getDefinitions(): erro!"); }
+    } catch (e) { console.log("intersection-model.js: getDefinitions(): erro!"); }
     }
 
   bind (posX, posY, label, og1, og2, visible, index) {
@@ -110,7 +111,7 @@ console.log("intersection-model.js: og1=" + og1.label +", og2=" + og2.label + ",
       const og1 = list.find(x => x.id == og1_Id);
       const og2 = list.find(x => x.id == og2_Id);
 
-      const intersections = og1.getIntersection(og2); // intersection providade by the first geometric object
+      const intersections = og1.getIntersection(og2); // intersection providaded by the first geometric object
 
       if (intersections.length == 1) {
         const i = intersections[0];