From ed09c7d43569f7cb55f14de1ce2ea533452090ef Mon Sep 17 00:00:00 2001 From: Chase Porter Date: Tue, 27 Aug 2024 11:52:07 -0700 Subject: [PATCH] Updates default opacity for lidar data to 1 --- fdds/js/components/domainSelector.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fdds/js/components/domainSelector.js b/fdds/js/components/domainSelector.js index b590c14..d417fae 100644 --- a/fdds/js/components/domainSelector.js +++ b/fdds/js/components/domainSelector.js @@ -162,10 +162,9 @@ export class DomainSelector extends HTMLElement { presetCurrentTimestamp(nextTimestamps) { let startDate = controllers.startDate.getValue(); let endDate = controllers.endDate.getValue(); - let currentSim = simVars.currentSimulation; // if currentSim has "lidar" in it, then set the currentTimestamp to the last timestamp - let currentTimestamp = currentSim.includes("lidar") ? endDate : startDate; + let currentTimestamp = this.isLidarProfile() ? endDate : startDate; let presetTimestamp = localToUTC(simVars.presets.timestamp); if (nextTimestamps.includes(presetTimestamp) && presetTimestamp >= startDate && presetTimestamp <= endDate) { currentTimestamp = presetTimestamp; @@ -173,9 +172,15 @@ export class DomainSelector extends HTMLElement { simVars.presets.timestamp = null; controllers.currentTimestamp.setValue(currentTimestamp, controllerEvents.QUIET); } + + isLidarProfile() { + let currentSim = simVars.currentSimulation; + return currentSim.includes("lidar"); + } presetOpacity() { - let opacity = 0.5; + // for lidar profiles, set initial opacity to 1 + let opacity = this.isLidarProfile() ? 1.0 : 0.5; let presetOpacity = simVars.presets.opacity; if (presetOpacity && !isNaN(presetOpacity)) { presetOpacity = Number(presetOpacity); -- 2.11.4.GIT