From b7792d2f08e6ccce6b6e294703760ccddd8f8f0a Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Fri, 16 Feb 2024 14:58:57 -0500 Subject: [PATCH] Adjust opacity of cluster layers when changing modes. --- src/Radwave.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Radwave.vue b/src/Radwave.vue index a0e500e..1504284 100644 --- a/src/Radwave.vue +++ b/src/Radwave.vue @@ -551,6 +551,7 @@ export default defineComponent({ phaseOpacityIntercept, clusterColor: "#1f3cf1", defaultClusterDecay: 15, + opacity2Dto3DFactor: 2.5, sunColor: "#ffff0a", sunLayer: null as SpreadSheetLayer | null, @@ -726,6 +727,7 @@ export default defineComponent({ bestFitOffsets = bestFitOffsets2D; this.clusterLayers.forEach(layer => { layer.set_decay(1); + layer.set_opacity(this.opacity2Dto3DFactor * layer.get_opacity()); }); this.setBackgroundImageByName(this.background2DImageset); @@ -751,27 +753,24 @@ export default defineComponent({ }, set3DMode() { - bestFitOffsets = bestFitOffsets3D; this.clusterLayers.forEach(layer => { layer.set_decay(this.defaultClusterDecay); + layer.set_opacity(layer.get_opacity() / this.opacity2Dto3DFactor); }); - this.setBackgroundImageByName("Solar System"); this.setForegroundImageByName("Solar System"); this.sunLayer?.set_opacity(1); updateBestFitAnnotations(phase); - return this.gotoRADecZoom({ ...this.position3D, instant: true, }).catch((err) => { console.log(err); }); - },