From bd09273d7331af2c4164a6e5163f76ac5a92ed12 Mon Sep 17 00:00:00 2001 From: Johannes Telle Date: Wed, 16 Oct 2024 15:38:14 +0200 Subject: [PATCH 1/5] Added fill to equipment --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a5ef23a..989e009 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ client/Boundaries/Boundaries/obj client/Boundaries/TestBoundaries/obj client/Boundaries/TestBoundaries/bin aibel_dexpi/* -aibel_dexpi.xml \ No newline at end of file +aibel_dexpi.xml +/client/Boundaries/Dexpi2Svg/output.svg From 3caf7a84d9699d978f212126d8c2d0c745afecb1 Mon Sep 17 00:00:00 2001 From: Johannes Telle Date: Wed, 16 Oct 2024 15:38:44 +0200 Subject: [PATCH 2/5] Added color to equipment --- www/script.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/www/script.js b/www/script.js index 80f4f68..9cbb191 100644 --- a/www/script.js +++ b/www/script.js @@ -52,6 +52,15 @@ async function handleNodeClick(node, event) { } function createHighlightBox(node) { + var parentElement = node.parentNode; + if(parentElement.tagName === 'symbol'){ + var internalPaths = parentElement.querySelectorAll('path, ellipse, rect, circle'); + internalPaths.forEach(path => { + path.setAttribute('fill', 'yellow'); + path.setAttribute('fill-opacity', '0.2'); + }); + } + var highlightRects = node.querySelectorAll('.commissionHighlight'); if (highlightRects.length !== 0) return; @@ -107,6 +116,14 @@ function addCommissionHighlight(node){ } function removeCommissionHighlight(node) { + var parentElement = node.parentNode; + if(parentElement.tagName === 'symbol'){ + var internalPaths = parentElement.querySelectorAll('path, ellipse, rect, circle'); + internalPaths.forEach(path => { + path.setAttribute('fill', 'none'); + path.setAttribute('fill-opacity', '0.0'); + }); + } let highlightRects = node.querySelectorAll('.commissionHighlight'); highlightRects.forEach(rect => rect.remove()); } @@ -150,7 +167,7 @@ async function updateInCommissioningPackage() { document.getElementById('boundary-table-container').innerHTML = ''; } nodes.forEach(node => { - if (nodeIds.includes(node.id) && !node.classList.contains('boundary') && !node.classList.contains('insideBoundary')) { + if (nodeIds.includes(node.id) && !node.classList.contains('boundary')) { addCommissionHighlight(node); } else { removeCommissionHighlight(node); From 83ce3a44a7c42014598240f4f5f1f518a2ad4934 Mon Sep 17 00:00:00 2001 From: Johannes Telle Date: Wed, 16 Oct 2024 15:39:43 +0200 Subject: [PATCH 3/5] fix --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 989e009..16d5e81 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,3 @@ client/Boundaries/TestBoundaries/obj client/Boundaries/TestBoundaries/bin aibel_dexpi/* aibel_dexpi.xml -/client/Boundaries/Dexpi2Svg/output.svg From 67d739b2ceb154643d056d13353d276a41a6c5a9 Mon Sep 17 00:00:00 2001 From: Johannes Telle Date: Wed, 16 Oct 2024 15:40:34 +0200 Subject: [PATCH 4/5] fix --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 16d5e81..8fce4c2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ client/Boundaries/TestBoundaries/obj client/Boundaries/TestBoundaries/bin aibel_dexpi/* aibel_dexpi.xml + From 3a9eefe52f4b5be3230d14f46ce3e3d4df684e36 Mon Sep 17 00:00:00 2001 From: Johannes Telle Date: Thu, 17 Oct 2024 11:51:36 +0200 Subject: [PATCH 5/5] Changed sparql query dfor inside boundary --- www/script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/script.js b/www/script.js index 9cbb191..0021b46 100644 --- a/www/script.js +++ b/www/script.js @@ -136,7 +136,12 @@ async function updateInCommissioningPackage() { let queryInside = ` SELECT * WHERE { ?node a data:insideBoundary . - ?node ?o . + ?node ?o . + { ?node ?tagNr. } + UNION + { ?node ?tagNr. } + FILTER NOT EXISTS { ?node a imf:Terminal . } + } `; let queryBoundary = `