Skip to content

Commit

Permalink
Een aantal Electro_Items overgezet van oude Key systeem naar nieuwe P…
Browse files Browse the repository at this point in the history
…rops systeem. Aansluitpunt, Aftakdoos, Batterij, Diepvriezer, Droogkast, Elektriciteitsmeter, Elektrische_oven, EV_lader, Koelkast, Kookfornuis, Microgolfoven, Motor, Omvormer, Overspanningsbeveiliging, Stoomoven, Vaatwasmachine, Ventilator, Wasmachine
  • Loading branch information
igoethal committed Jan 2, 2024
1 parent 121e070 commit 5a02e9a
Show file tree
Hide file tree
Showing 21 changed files with 576 additions and 288 deletions.
2 changes: 1 addition & 1 deletion builddate.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var CONF_builddate="20240102-141141"
var CONF_builddate="20240102-143921"
270 changes: 180 additions & 90 deletions eendraadschema.js

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions src/List_Item/Aansluitpunt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Aansluitpunt extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Aansluitpunt"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Aansluitpunt";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -31,7 +37,7 @@ class Aansluitpunt extends Electro_Item {
mySVG.data += '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#aansluitpunt" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,45,0);
mySVG.data += this.addPropAddress(mySVG,45,0);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/Aftakdoos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Aftakdoos extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Aftakdoos"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Aftakdoos";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -31,7 +37,7 @@ class Aftakdoos extends Electro_Item {
mySVG.data += '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#aftakdoos" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,55,10);
mySVG.data += this.addPropAddress(mySVG,55,10);
mySVG.data += "\n";

return(mySVG);
Expand Down
16 changes: 11 additions & 5 deletions src/List_Item/Batterij.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Batterij extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Batterij"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
this.props.type = "Batterij";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -32,7 +38,7 @@ class Batterij extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#batterij" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,55,10);
mySVG.data += this.addPropAddress(mySVG,55,10);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/Diepvriezer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Diepvriezer extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Diepvriezer"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Diepvriezer";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -32,7 +38,7 @@ class Diepvriezer extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#diepvriezer" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,60,15);
mySVG.data += this.addPropAddress(mySVG,60,15);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/Droogkast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Droogkast extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Droogkast"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Droogkast";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -31,7 +37,7 @@ class Droogkast extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#droogkast" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,60,15);
mySVG.data += this.addPropAddress(mySVG,60,15);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/EV_lader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class EV_lader extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "EV lader"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "EV lader";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -32,7 +38,7 @@ class EV_lader extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#EVlader" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,60,15);
mySVG.data += this.addPropAddress(mySVG,60,15);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/Elektriciteitsmeter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Elektriciteitsmeter extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Elektriciteitsmeter"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Elektriciteitsmeter";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -32,7 +38,7 @@ class Elektriciteitsmeter extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#elektriciteitsmeter" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,60,15);
mySVG.data += this.addPropAddress(mySVG,60,15);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/Elektrische_oven.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Elektrische_oven extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Elektrische oven"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Elektrische oven";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -32,7 +38,7 @@ class Elektrische_oven extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#oven" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,60,15);
mySVG.data += this.addPropAddress(mySVG,60,15);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/Koelkast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Koelkast extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Koelkast"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Koelkast";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -32,7 +38,7 @@ class Koelkast extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#koelkast" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,60,15);
mySVG.data += this.addPropAddress(mySVG,60,15);
mySVG.data += "\n";

return(mySVG);
Expand Down
18 changes: 12 additions & 6 deletions src/List_Item/Kookfornuis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ class Kookfornuis extends Electro_Item {
this.resetKeys();
}

convertLegacyKeys(mykeys: Array<[string,string,any]>) {
this.props.type = mykeys[0][2];
this.props.adres = mykeys[15][2];
}

resetKeys() {
this.clearKeys();
this.keys[0][2] = "Kookfornuis"; // This is rather a formality as we should already have this at this stage
this.keys[15][2] = ""; // Set Adres/tekst to "" when the item is cleared
}
this.props.type = "Kookfornuis";
this.props.adres = "";
delete this.keys;
}

toHTML(mode: string) {
let output = this.toHTMLHeader(mode);

output += "&nbsp;Nr: " + this.stringToHTML(10,5);
output += ", Adres/tekst: " + this.stringToHTML(15,5);
output += "&nbsp;Nr: " + this.stringPropToHTML('nr',5);
output += ", Adres/tekst: " + this.stringPropToHTML('adres',5);

return(output);
}
Expand All @@ -32,7 +38,7 @@ class Kookfornuis extends Electro_Item {
mySVG.data = '<line x1="1" y1="25" x2="21" y2="25" stroke="black"></line>'
+ '<use xlink:href="#kookfornuis" x="21" y="25"></use>';

mySVG.data += this.addAddress(mySVG,60,15);
mySVG.data += this.addPropAddress(mySVG,60,15);
mySVG.data += "\n";

return(mySVG);
Expand Down
Loading

0 comments on commit 5a02e9a

Please sign in to comment.