|
@@ -31,7 +31,7 @@ export class IntersectionModel extends PointModel {
|
|
this.color = -65536; // rgba(255,0,0,1)
|
|
this.color = -65536; // rgba(255,0,0,1)
|
|
this.definitions = this.getDefinitions();
|
|
this.definitions = this.getDefinitions();
|
|
this.backgroundColor = "#aa0000"; // setBackgroundColor(color)
|
|
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); }
|
|
} 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!"); }
|
|
} 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 () {
|
|
getDefinitions () {
|
|
try { //D //leo
|
|
try { //D //leo
|
|
return [{ id: this.og1.id }, { id: this.og2.id }, { id: this.index + 1 }, { id: this.visible ? 1 : 0 }];
|
|
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) {
|
|
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 og1 = list.find(x => x.id == og1_Id);
|
|
const og2 = list.find(x => x.id == og2_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) {
|
|
if (intersections.length == 1) {
|
|
const i = intersections[0];
|
|
const i = intersections[0];
|