moving logic to variables, updating faulty logic, resetting debug code

This commit is contained in:
Jamie V 2024-11-21 12:01:00 -08:00
parent 47892b9641
commit 03a97c17d0
4 changed files with 17 additions and 6 deletions

View File

@ -33,11 +33,11 @@
<ConductorModeIcon class="c-conductor__mode-icon" />
<div class="c-compact-tc__setting-value u-fade-truncate">
<ConductorMode :read-only="true" />
<ConductorClock v-if="openmct.time.clocks.size > 0" :read-only="true" />
<ConductorClock v-if="hasRegisteredClocks" :read-only="true" />
<ConductorTimeSystem :read-only="true" />
</div>
<ConductorInputsFixed v-if="isFixedTimeMode" :input-bounds="viewBounds" :read-only="true" />
<ConductorInputsRealtime v-else-if="openmct.time.clocks.size > 0" :input-bounds="viewBounds" :read-only="true" />
<ConductorInputsRealtime v-else-if="hasRegisteredClocks" :input-bounds="viewBounds" :read-only="true" />
<ConductorAxis
v-if="isFixedTimeMode"
class="c-conductor__ticks"
@ -138,6 +138,8 @@ export default {
};
},
data() {
const hasRegisteredClocks = this.openmct.time.clocks.size > 0;
return {
viewBounds: {
start: this.bounds.start,
@ -147,7 +149,8 @@ export default {
showConductorPopup: false,
altPressed: false,
isPanning: false,
isZooming: false
isZooming: false,
hasRegisteredClocks
};
},
computed: {

View File

@ -12,12 +12,12 @@
title="Sets the Time Conductor's mode."
/>
<IndependentClock
v-if="isIndependent && openmct.time.clocks.size > 0"
v-if="isIndependent && hasRegisteredClocks"
class="c-conductor__mode-select"
title="Sets the Time Conductor's clock."
/>
<ConductorClock
v-else-if="openmct.time.clocks.size > 0"
v-else-if="hasRegisteredClocks"
class="c-conductor__mode-select"
title="Sets the Time Conductor's clock."
/>
@ -76,6 +76,13 @@ export default {
}
},
emits: ['popup-loaded', 'dismiss'],
data() {
const hasRegisteredClocks = this.openmct.time.clocks.size > 0;
return {
hasRegisteredClocks
};
},
computed: {
position() {
const position = {

View File

@ -6,7 +6,7 @@ export default {
const modes = [FIXED_MODE_KEY];
const clockCount = this.openmct.time.clocks.size;
if (clockCount > 1) {
if (clockCount > 0) {
modes.push(REALTIME_MODE_KEY);
}

View File

@ -33,6 +33,7 @@ export default function () {
return function (openmct) {
const timeSystem = new UTCTimeSystem();
openmct.time.addTimeSystem(timeSystem);
openmct.time.addClock(new LocalClock(100));
openmct.telemetry.addFormat(new UTCTimeFormat());
openmct.telemetry.addFormat(new DurationFormat());