Skip to content

Commit 28c2643

Browse files
committed
Nieuw symbool "Zekering/differentieel" voor horizontale zekeringen.
1 parent abd08d9 commit 28c2643

13 files changed

+678
-37
lines changed

builddate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var CONF_builddate="20240715-204933"
1+
var CONF_builddate="20240823-133216"

eendraadschema.js

Lines changed: 214 additions & 12 deletions
Large diffs are not rendered by default.

prop/prop_scripts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ function exportjson() {
6161
listitem.sourcelist = structure;
6262
}
6363

64-
// Compress the output structure and offer as download to the user. We are at version 003
64+
// Compress the output structure and offer as download to the user. We are at version 004
6565
try {
6666
let decoder = new TextDecoder("utf-8");
6767
let encoder = new TextEncoder();
6868
let pako_inflated = new Uint8Array(encoder.encode(text));
6969
let pako_deflated = new Uint8Array(pako.deflate(pako_inflated));
70-
text = "EDS0030000" + btoa(String.fromCharCode.apply(null, pako_deflated));
70+
text = "EDS0040000" + btoa(String.fromCharCode.apply(null, pako_deflated));
7171
} catch (error) {
72-
text = "TXT0030000" + text;
72+
text = "TXT0040000" + text;
7373
} finally {
7474
download_by_blob(text, filename, 'data:text/eds;charset=utf-8');
7575
}

src/Hierarchical_List.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ class Hierarchical_List {
211211
case 'Warmtepomp/airco': tempval = new Warmtepomp(structure); break;
212212
case 'Wasmachine': tempval = new Wasmachine(structure); break;
213213
case 'Zeldzame symbolen': tempval = new Zeldzame_symbolen(structure); break;
214+
case 'Zekering/differentieel': tempval = new Zekering(structure); break;
214215
case 'Zonnepaneel': tempval = new Zonnepaneel(structure); break;
215216
default: tempval = new Electro_Item(structure);
216217
}

src/List_Item/Bord.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ class Bord extends Electro_Item {
4444

4545
// Schuif het geheel voldoende naar links om plaats te hebben voor label en eventuele aarding
4646

47-
let mintextsize = Math.max(30, svgTextWidth('&lt'+htmlspecialchars(this.props.naam)+'&gt',10,'font-weight="bold"') + 13);
47+
let mintextsize = Math.max(30, svgTextWidth(htmlspecialchars(this.props.naam),10,'font-weight="bold"') + 13);
4848
let minxleft = mintextsize + (this.props.is_geaard ? 70 : 0); //Indien geaard hebben we 70 meer nodig
49-
49+
if (this.isChildOf("Aansluiting")) {
50+
let maxTotalSize = 145;
51+
if (this.getParent().props.type_kabel_voor_teller != "") maxTotalSize = maxTotalSize + 50;
52+
let lengthToAdd = Math.max(0,(maxTotalSize - minxleft));
53+
mintextsize = mintextsize + lengthToAdd;
54+
minxleft = minxleft + lengthToAdd;
55+
}
56+
5057
if (mySVG.xleft <= minxleft) { // Minstens 100 pixels indien aarding
5158
mySVG.xright = mySVG.xleft + mySVG.xright - minxleft;
5259
mySVG.xleft = minxleft;
@@ -65,8 +72,8 @@ class Bord extends Electro_Item {
6572
// Voeg naam van het bord toe
6673
if (this.props.naam !== "")
6774
mySVG.data += '<text x="' + (5) + '" y="' + (mySVG.yup + 13) + '" '
68-
+ 'style="text-anchor:start" font-family="Arial, Helvetica, sans-serif" font-weight="bold" font-size="10">&lt;'
69-
+ htmlspecialchars(this.props.naam)+'&gt;</text>';
75+
+ 'style="text-anchor:start" font-family="Arial, Helvetica, sans-serif" font-weight="bold" font-size="10">'
76+
+ htmlspecialchars(this.props.naam)+'</text>';
7077

7178
// Teken aarding onderaan
7279
if (this.props.is_geaard)

src/List_Item/Domotica_verticaal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Domotica_verticaal extends Electro_Item {
1212
}
1313

1414
allowedChilds() : Array<string> { // returns an array with the type-names of allowed childs
15-
return ["", "Aansluiting", "Domotica", "Domotica gestuurde verbruiker", "Leiding", "Meerdere verbruikers", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Media", "Microgolfoven", "Motor", "Omvormer", "Overspanningsbeveiliging", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
15+
return ["", "Aansluiting", "Domotica", "Domotica module (verticaal)", "Domotica gestuurde verbruiker", "Leiding", "Meerdere verbruikers", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Media", "Microgolfoven", "Motor", "Omvormer", "Overspanningsbeveiliging", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zekering/differentieel", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
1616
}
1717

1818
getMaxNumChilds(): number {

src/List_Item/Electro_Item.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Electro_Item extends List_Item {
3232
// -- Lijst met toegestande kinderen van het Electro_item --
3333

3434
allowedChilds() : Array<string> {
35-
return ["", "Aansluiting", "Domotica", "Domotica module (verticaal)", "Domotica gestuurde verbruiker", "Meerdere verbruikers", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Media", "Microgolfoven", "Motor", "Omvormer", "Overspanningsbeveiliging", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
35+
return ["", "Aansluiting", "Domotica", "Domotica module (verticaal)", "Domotica gestuurde verbruiker", "Meerdere verbruikers", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Media", "Microgolfoven", "Motor", "Omvormer", "Overspanningsbeveiliging", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zekering/differentieel", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
3636
}
3737

3838
// -- Aantal actieve kinderen van het Electro_item --
@@ -103,6 +103,12 @@ class Electro_Item extends List_Item {
103103

104104
getType() : string { return this.props.type; }
105105

106+
// -- Checken of parent een gevraagd type is --
107+
108+
isChildOf(typestr: string) {
109+
if (this.parent != 0) return (this.getParent().getType() == typestr); else return false;
110+
}
111+
106112
//-- Clear all keys, met uitzondering van nr indien er een nummer is --
107113

108114
clearProps() {
@@ -163,7 +169,7 @@ class Electro_Item extends List_Item {
163169
let parent:Electro_Item = this.getParent();
164170
let consumerArray;
165171

166-
if (parent == null) consumerArray = ["", "Kring", "Aansluiting"];
172+
if (parent == null) consumerArray = ["", "Aansluiting", "Zekering/differentieel", "Kring"];
167173
else consumerArray = this.getParent().allowedChilds()
168174

169175
output += this.selectPropToHTML('type', consumerArray);

src/List_Item/Kring.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Kring extends Electro_Item {
8080
}
8181

8282
allowedChilds() : Array<string> { // returns an array with the type-names of allowed childs
83-
return ["", "Aansluiting", "Bord", "Domotica", "Domotica module (verticaal)", "Domotica gestuurde verbruiker", "Kring", "Meerdere verbruikers", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Media", "Microgolfoven", "Motor", "Omvormer", "Overspanningsbeveiliging", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
83+
return ["", "Aansluiting", "Bord", "Domotica", "Domotica module (verticaal)", "Domotica gestuurde verbruiker", "Kring", "Meerdere verbruikers", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Media", "Microgolfoven", "Motor", "Omvormer", "Overspanningsbeveiliging", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zekering/differentieel", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
8484
}
8585

8686
getMaxNumChilds(): number {

src/List_Item/Meerdere_verbruikers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Meerdere_verbruikers extends Electro_Item {
1313
}
1414

1515
allowedChilds() : Array<string> { // returns an array with the type-names of allowed childs
16-
return ["", "Domotica", "Domotica gestuurde verbruiker", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Omvormer", "Overspanningsbeveiliging", "Media", "Microgolfoven", "Motor", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
16+
return ["", "Domotica", "Domotica gestuurde verbruiker", "Splitsing", "---", "Batterij", "Bel", "Boiler", "Contactdoos", "Diepvriezer", "Droogkast", "Drukknop", "Elektriciteitsmeter", "Elektrische oven", "EV lader", "Ketel", "Koelkast", "Kookfornuis", "Lichtcircuit", "Lichtpunt", "Omvormer", "Overspanningsbeveiliging", "Media", "Microgolfoven", "Motor", "Schakelaars", "Stoomoven", "Transformator", "USB lader", "Vaatwasmachine", "Ventilator", "Verlenging", "Verwarmingstoestel", "Verbruiker", "Vrije tekst", "Warmtepomp/airco", "Wasmachine", "Zekering/differentieel", "Zonnepaneel", "---", "Aansluitpunt", "Aftakdoos", "Leeg", "Zeldzame symbolen"];
1717
}
1818

1919
getMaxNumChilds(): number {

0 commit comments

Comments
 (0)