Skip to content

Commit d896f37

Browse files
committed
Probleem opgelost met verticale strepen van boiler (patroon) die niet zichtbaar waren in het situatieschema. Reden was dat het patroon ook al bestond in het eendraadschema zelf (naming conflict).
1 parent 94f2ca9 commit d896f37

File tree

4 files changed

+33
-6
lines changed

4 files changed

+33
-6
lines changed

builddate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var CONF_builddate="20250122-203525"
1+
var CONF_builddate="20250125-134133"

eendraadschema.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8494,7 +8494,7 @@ var SVGSymbols = /** @class */ (function () {
84948494
contactdoos_aarding: "\n<line x1=\"20\" y1=\"-15\" x2=\"20\" y2=\"15\" stroke=\"black\" stroke-width=\"2\" />\n",
84958495
contactdoos_kinderveilig: "\n<line x1=\"35\" y1=\"-20\" x2=\"35\" y2=\"-14.1\" stroke=\"black\" stroke-width=\"2\" />\n<line x1=\"35\" y1=\"20\" x2=\"35\" y2=\"14.1\" stroke=\"black\" stroke-width=\"2\" />\n",
84968496
bel: "\n<path d=\"M20 0 A15 15 0 0 1 0 15\" stroke=\"black\" fill=\"none\" stroke-width=\"2\" />\n<path d=\"M20 0 A15 15 0 0 0 0 -15\" stroke=\"black\" fill=\"none\" stroke-width=\"2\" />\n<line x1=\"0\" y1=\"15\" x2=\"0\" y2=\"-15\" stroke=\"black\" stroke-width=\"2\" />\n",
8497-
boiler: "\n<circle cx=\"20\" cy=\"0\" r=\"20\" style=\"stroke:black;fill:url(#VerticalStripe)\" />\n",
8497+
boiler: "\n<circle cx=\"20\" cy=\"0\" r=\"20\" style=\"stroke:black; fill:url(#VerticalStripe);\" />\n",
84988498
boiler_accu: "\n<circle cx=\"20\" cy=\"0\" r=\"20\" style=\"stroke:black;fill:none\" />\n<circle cx=\"20\" cy=\"0\" r=\"15\" style=\"stroke:black;fill:url(#VerticalStripe)\" />\n",
84998499
motor: "\n<circle cx=\"20\" cy=\"0\" r=\"20\" style=\"stroke:black;fill:none\" />\n<text x=\"20\" y=\"6\" style=\"text-anchor:middle\" font-family=\"Arial, Helvetica, sans-serif\" font-weight=\"bold\" font-size=\"16\">M</text>\n",
85008500
elektriciteitsmeter: "\n<rect x=\"0\" y=\"-20\" width=\"40\" height=\"40\" fill=\"none\" style=\"stroke:black\" />\n<line x1=\"0\" y1=\"-6\" x2=\"40\" y2=\"-6\" stroke=\"black\" stroke-width=\"1\" />\n<text x=\"20\" y=\"10\" style=\"text-anchor:middle\" font-family=\"Arial, Helvetica, sans-serif\" font-weight=\"bold\" font-size=\"12\">kWh</text>\n",
@@ -9507,7 +9507,7 @@ function HLRedrawTreeHTMLLight() {
95079507
}
95089508
function HLRedrawTreeSVG() {
95099509
var str = '<b>Tekening: </b>Ga naar het print-menu om de tekening af te printen of te exporteren als SVG vector graphics.<br><br>'
9510-
+ flattenSVGfromString(structure.toSVG(0, "horizontal").data, 10)
9510+
+ '<div id="EDS">' + flattenSVGfromString(structure.toSVG(0, "horizontal").data, 10) + '</div>'
95119511
+ '<h2>Legende:</h2>'
95129512
+ '<button style="background-color:green;">&#9650;</button> Item hierboven invoegen (zelfde niveau)<br>'
95139513
+ '<button style="background-color:green;">&#9660;</button> Item hieronder invoegen (zelfde niveau)<br>'
@@ -9642,6 +9642,7 @@ function toggleAppView(type) {
96429642
var lastview = structure.properties.currentView;
96439643
structure.properties.currentView = type;
96449644
if (type === '2col') {
9645+
document.getElementById("configsection").innerHTML = '';
96459646
document.getElementById("configsection").style.display = 'none';
96469647
document.getElementById("outerdiv").style.display = 'none';
96479648
document.getElementById("ribbon").style.display = 'flex';
@@ -9651,13 +9652,20 @@ function toggleAppView(type) {
96519652
else if (type === 'config') {
96529653
document.getElementById("configsection").style.display = 'block';
96539654
document.getElementById("outerdiv").style.display = 'none';
9655+
document.getElementById("ribbon").innerHTML = ''; // Voor performance redenen
96549656
document.getElementById("ribbon").style.display = 'none';
9657+
document.getElementById("left_col_inner").innerHTML = ''; // Voor performance redenen
9658+
// We zetten bewist het SVG element EDS niet op nul want is nodig voor het print-voorbeeld
96559659
document.getElementById("canvas_2col").style.display = 'none';
96569660
}
96579661
else if (type === 'draw') {
9662+
document.getElementById("configsection").innerHTML = "";
96589663
document.getElementById("configsection").style.display = 'none';
96599664
document.getElementById("outerdiv").style.display = 'flex';
96609665
document.getElementById("ribbon").style.display = 'flex';
9666+
document.getElementById("left_col_inner").innerHTML = ''; // Voor performance redenen
9667+
if (document.getElementById("EDS") !== null)
9668+
document.getElementById("EDS").innerHTML = ''; // Deze is nodig anders wil het situatieschema het patroon VerticalStripe niet laden wegens dubbel gedefinieerd
96619669
document.getElementById("canvas_2col").style.display = 'none';
96629670
}
96639671
if ((['2col', 'draw'].includes(type)) && (['2col', 'draw'].includes(lastview)) && (type !== lastview))

src/SVGSymbols.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SVGSymbols {
2020
'<line x1="0" y1="0" x2="0" y2="10" stroke="black" />' +
2121
'</pattern>';
2222
}
23-
23+
2424
for (let key in this.data) {
2525
if (this.neededSymbols.includes(key)) {
2626
output += `<g id="${key}">${this.data[key].replace(/\n/g, '')}</g>`;
@@ -257,7 +257,7 @@ bel: `
257257
<line x1="0" y1="15" x2="0" y2="-15" stroke="black" stroke-width="2" />
258258
`,
259259
boiler: `
260-
<circle cx="20" cy="0" r="20" style="stroke:black;fill:url(#VerticalStripe)" />
260+
<circle cx="20" cy="0" r="20" style="stroke:black; fill:url(#VerticalStripe);" />
261261
`,
262262
boiler_accu: `
263263
<circle cx="20" cy="0" r="20" style="stroke:black;fill:none" />

src/main.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function HLRedrawTreeHTMLLight() {
142142

143143
function HLRedrawTreeSVG() {
144144
let str:string = '<b>Tekening: </b>Ga naar het print-menu om de tekening af te printen of te exporteren als SVG vector graphics.<br><br>'
145-
+ flattenSVGfromString(structure.toSVG(0,"horizontal").data,10)
145+
+ '<div id="EDS">' + flattenSVGfromString(structure.toSVG(0,"horizontal").data,10) + '</div>'
146146
+ '<h2>Legende:</h2>'
147147
+ '<button style="background-color:green;">&#9650;</button> Item hierboven invoegen (zelfde niveau)<br>'
148148
+ '<button style="background-color:green;">&#9660;</button> Item hieronder invoegen (zelfde niveau)<br>'
@@ -300,20 +300,39 @@ function toggleAppView(type: '2col' | 'config' | 'draw') {
300300

301301
structure.properties.currentView = type;
302302
if (type === '2col') {
303+
document.getElementById("configsection").innerHTML = '';
303304
document.getElementById("configsection").style.display = 'none';
305+
304306
document.getElementById("outerdiv").style.display = 'none';
307+
305308
document.getElementById("ribbon").style.display = 'flex';
306309
document.getElementById("canvas_2col").style.display = 'flex';
307310
structure.updateRibbon();
308311
} else if (type === 'config') {
309312
document.getElementById("configsection").style.display = 'block';
313+
310314
document.getElementById("outerdiv").style.display = 'none';
315+
316+
document.getElementById("ribbon").innerHTML = ''; // Voor performance redenen
311317
document.getElementById("ribbon").style.display = 'none';
318+
319+
document.getElementById("left_col_inner").innerHTML = ''; // Voor performance redenen
320+
321+
// We zetten bewist het SVG element EDS niet op nul want is nodig voor het print-voorbeeld
322+
312323
document.getElementById("canvas_2col").style.display = 'none';
313324
} else if (type === 'draw') {
325+
document.getElementById("configsection").innerHTML = "";
314326
document.getElementById("configsection").style.display = 'none';
327+
315328
document.getElementById("outerdiv").style.display = 'flex';
316329
document.getElementById("ribbon").style.display = 'flex';
330+
331+
document.getElementById("left_col_inner").innerHTML = ''; // Voor performance redenen
332+
333+
if (document.getElementById("EDS") !== null)
334+
document.getElementById("EDS").innerHTML = ''; // Deze is nodig anders wil het situatieschema het patroon VerticalStripe niet laden wegens dubbel gedefinieerd
335+
317336
document.getElementById("canvas_2col").style.display = 'none';
318337
}
319338

0 commit comments

Comments
 (0)