|
@@ -1,24 +1,39 @@
|
|
-// iGeom JS
|
|
|
|
-// LInE: "free software and private data"
|
|
|
|
|
|
+/*
|
|
|
|
+ * iGeom by LInE
|
|
|
|
+ * Free software to student private data
|
|
|
|
+ *
|
|
|
|
+ * http://www.matematica.br/igeom
|
|
|
|
+ * http://www.usp.br/line
|
|
|
|
+ *
|
|
|
|
+ * ./app/core/drawers/drawer-aggregator.js
|
|
|
|
+ * @version 2023/07/14: Fix in reading GEO file with midpoint
|
|
|
|
+ */
|
|
|
|
|
|
export class DrawerAggregator {
|
|
export class DrawerAggregator {
|
|
|
|
|
|
static static_id = 1; // help in debug
|
|
static static_id = 1; // help in debug
|
|
|
|
|
|
constructor (drawer, geometricObject, konvaObject, elementClass) {
|
|
constructor (drawer, geometricObject, konvaObject, elementClass) {
|
|
- this.id = DrawerAggregator.static_id++; // DrawerAggregator identification number
|
|
|
|
- console.log("drawer-aggregator.js!update(e): this.id=" + this.id); //D
|
|
|
|
- this.drawer = drawer;
|
|
|
|
- this.genericObject = geometricObject;
|
|
|
|
- this.konvaObject = konvaObject;
|
|
|
|
- this.aggregators = [];
|
|
|
|
- this.visible = true;
|
|
|
|
- if (elementClass != undefined) this.elementClass = elementClass;
|
|
|
|
- else {
|
|
|
|
- if (konvaObject.attrs != undefined && konvaObject.attrs.class != undefined)
|
|
|
|
- this.elementClass = konvaObject.attrs.class;
|
|
|
|
|
|
+ try {
|
|
|
|
+ this.id = DrawerAggregator.static_id++; // DrawerAggregator identification number
|
|
|
|
+ console.log("drawer-aggregator.js!constructor(.): this.id=" + this.id); //D
|
|
|
|
+ this.drawer = drawer;
|
|
|
|
+ this.genericObject = geometricObject;
|
|
|
|
+ this.konvaObject = konvaObject;
|
|
|
|
+ this.aggregators = [];
|
|
|
|
+ this.visible = true;
|
|
|
|
+ if (elementClass != undefined) this.elementClass = elementClass;
|
|
|
|
+ else {
|
|
|
|
+ if (konvaObject.attrs != undefined && konvaObject.attrs.class != undefined)
|
|
|
|
+ this.elementClass = konvaObject.attrs.class;
|
|
}
|
|
}
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log("drawer-aggregator.js!constructor(.): this.id=" + this.id + ", error = " + error);
|
|
}
|
|
}
|
|
|
|
+ //DD if (this.id==2) console.trace();
|
|
|
|
+ console.log("drawer-aggregator.js!constructor(.): OK final de this.id=" + this.id); //D
|
|
|
|
+ }
|
|
|
|
+
|
|
setGeometricObject (genericObject) {
|
|
setGeometricObject (genericObject) {
|
|
this.genericObject = genericObject;
|
|
this.genericObject = genericObject;
|
|
}
|
|
}
|