From f819856a3c3abfe23f3d3baf666c247d9af1198b Mon Sep 17 00:00:00 2001 From: Joseph Birkner Date: Tue, 20 Aug 2024 16:01:41 +0200 Subject: [PATCH] Update default style. --- config/styles/default-style.yaml | 42 +++++++++++++++++++++++++++++--- erdblick_app/app/map.service.ts | 7 +++--- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/config/styles/default-style.yaml b/config/styles/default-style.yaml index 1fbe89be..5fa6c793 100644 --- a/config/styles/default-style.yaml +++ b/config/styles/default-style.yaml @@ -1,15 +1,51 @@ name: DefaultStyle version: 1.0 +options: + - label: Show Meshes/Polygons + id: showMesh + - label: Show Points + id: showPoint + - label: Show Lines + id: showLine + rules: + # Normal styles - geometry: ["mesh", "polygon"] + filter: "showMesh" color: teal opacity: 0.8 - - geometry: ["point", "line"] + offset: [0, 0, -0.5] + - geometry: ["point"] + filter: "showPoint" color: moccasin opacity: 1.0 width: 1.0 - - geometry: ["point", "line", "mesh", "polygon"] + - geometry: ["line"] + filter: "showLine" + color: moccasin + opacity: 1.0 + width: 5.0 + + # Hover/Selection styles + - geometry: ["mesh", "polygon"] + color: yellow + opacity: 1.0 + width: 4.0 + mode: hover + offset: [0, 0, -0.5] + - geometry: ["point", "line"] + color: yellow + opacity: 1.0 + width: 4.0 + mode: hover + - geometry: ["mesh", "polygon"] + color: red + opacity: 1.0 + width: 4.0 + mode: selection + offset: [0, 0, -0.5] + - geometry: ["point", "line"] color: red opacity: 1.0 width: 4.0 - mode: highlight + mode: selection diff --git a/erdblick_app/app/map.service.ts b/erdblick_app/app/map.service.ts index a229dfa7..3e89423d 100644 --- a/erdblick_app/app/map.service.ts +++ b/erdblick_app/app/map.service.ts @@ -711,13 +711,12 @@ export class MapService { return; } - if (!featureWrappers.length) { - return; - } - while (visualizationCollection.length) { this.tileVisualizationDestructionTopic.next(visualizationCollection.pop()); } + if (!featureWrappers.length) { + return; + } // Apply additional highlight styles. const featureTile = featureWrappers[0].featureTile;