|
@@ -54,9 +54,10 @@ export class Action {
|
|
toString () {
|
|
toString () {
|
|
// Items of GEO line: Id, Type, Definition, List, Label, Defined, Color, Hidden, Pixel, Font, LabelColor;
|
|
// Items of GEO line: Id, Type, Definition, List, Label, Defined, Color, Hidden, Pixel, Font, LabelColor;
|
|
// Correspon. values: 1 0 2 3 4 5 6 7 8 9 10
|
|
// Correspon. values: 1 0 2 3 4 5 6 7 8 9 10
|
|
- var strC = "", tam;
|
|
|
|
|
|
+ var strC = "", strId = "", tam;
|
|
try {
|
|
try {
|
|
- if (this.id) strC += `${this.d(GEO_FILE.ID, this.id)}, `;
|
|
|
|
|
|
+ if (this.id!=undefined) strC += `${this.d(GEO_FILE.ID, this.id)}, `;
|
|
|
|
+ strId = strC;
|
|
strC += `${this.d(GEO_FILE.TYPE, this.type)}, `; // TYPE is 0 and JavaScript interpret it as false (do not use "if")
|
|
strC += `${this.d(GEO_FILE.TYPE, this.type)}, `; // TYPE is 0 and JavaScript interpret it as false (do not use "if")
|
|
if (this.definition) strC += `${this.d(GEO_FILE.DEFINITION, this.definition)}, `;
|
|
if (this.definition) strC += `${this.d(GEO_FILE.DEFINITION, this.definition)}, `;
|
|
if (this.list) strC += `${this.d(GEO_FILE.LIST, this.list)}, `;
|
|
if (this.list) strC += `${this.d(GEO_FILE.LIST, this.list)}, `;
|
|
@@ -74,7 +75,7 @@ export class Action {
|
|
strC = strC.substring(0, tam-1).trim();
|
|
strC = strC.substring(0, tam-1).trim();
|
|
} catch (error) { console.log("action.js!toString(): error " + error); }
|
|
} catch (error) { console.log("action.js!toString(): error " + error); }
|
|
strC = "{" + strC + "}!\n";
|
|
strC = "{" + strC + "}!\n";
|
|
- console.log("action.js!toString(): \n" + strC);
|
|
|
|
|
|
+ console.log("action.js!toString(): id=" + strId + "\n" + strC);
|
|
//D console.trace();
|
|
//D console.trace();
|
|
return strC;
|
|
return strC;
|
|
} // toString()
|
|
} // toString()
|
|
@@ -88,8 +89,8 @@ export class Action {
|
|
}
|
|
}
|
|
|
|
|
|
rehydrate () {
|
|
rehydrate () {
|
|
- console.log("action.js!rehydrate(): inicial"); //D
|
|
|
|
- this.id = this.genericObject.id;
|
|
|
|
|
|
+ console.log("action.js!rehydrate(): inicial - this.genericObject.id=" + this.genericObject.id); //D
|
|
|
|
+ this.id = this.genericObject.id; // Attention, caution with ID=0
|
|
this.type = this.genericObject.elementClass;
|
|
this.type = this.genericObject.elementClass;
|
|
this.definition = this.r(this.genericObject.definitions.map(x => x.id).toString());
|
|
this.definition = this.r(this.genericObject.definitions.map(x => x.id).toString());
|
|
this.list = this.r(this.genericObject.dependentsOnThis.map(x => x.id).toString());
|
|
this.list = this.r(this.genericObject.dependentsOnThis.map(x => x.id).toString());
|