mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
Squash merge no-realtime branch
This commit is contained in:
parent
38457fd262
commit
5cc3cd4310
@ -356,7 +356,7 @@ export class MCT extends EventEmitter {
|
|||||||
|
|
||||||
this.element = domElement;
|
this.element = domElement;
|
||||||
|
|
||||||
if (!this.time.getClock()) {
|
if (this.time.clocks.size !== 0 && !this.time.getClock()) {
|
||||||
this.time.setClock(this.defaultClock);
|
this.time.setClock(this.defaultClock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,11 +33,11 @@
|
|||||||
<ConductorModeIcon class="c-conductor__mode-icon" />
|
<ConductorModeIcon class="c-conductor__mode-icon" />
|
||||||
<div class="c-compact-tc__setting-value u-fade-truncate">
|
<div class="c-compact-tc__setting-value u-fade-truncate">
|
||||||
<ConductorMode :read-only="true" />
|
<ConductorMode :read-only="true" />
|
||||||
<ConductorClock :read-only="true" />
|
<ConductorClock v-if="hasRegisteredClocks" :read-only="true" />
|
||||||
<ConductorTimeSystem :read-only="true" />
|
<ConductorTimeSystem :read-only="true" />
|
||||||
</div>
|
</div>
|
||||||
<ConductorInputsFixed v-if="isFixedTimeMode" :input-bounds="viewBounds" :read-only="true" />
|
<ConductorInputsFixed v-if="isFixedTimeMode" :input-bounds="viewBounds" :read-only="true" />
|
||||||
<ConductorInputsRealtime v-else :input-bounds="viewBounds" :read-only="true" />
|
<ConductorInputsRealtime v-else-if="hasRegisteredClocks" :input-bounds="viewBounds" :read-only="true" />
|
||||||
<ConductorAxis
|
<ConductorAxis
|
||||||
v-if="isFixedTimeMode"
|
v-if="isFixedTimeMode"
|
||||||
class="c-conductor__ticks"
|
class="c-conductor__ticks"
|
||||||
@ -138,6 +138,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const hasRegisteredClocks = this.openmct.time.clocks.size > 0;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
viewBounds: {
|
viewBounds: {
|
||||||
start: this.bounds.start,
|
start: this.bounds.start,
|
||||||
@ -147,7 +149,8 @@ export default {
|
|||||||
showConductorPopup: false,
|
showConductorPopup: false,
|
||||||
altPressed: false,
|
altPressed: false,
|
||||||
isPanning: false,
|
isPanning: false,
|
||||||
isZooming: false
|
isZooming: false,
|
||||||
|
hasRegisteredClocks
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
title="Sets the Time Conductor's mode."
|
title="Sets the Time Conductor's mode."
|
||||||
/>
|
/>
|
||||||
<IndependentClock
|
<IndependentClock
|
||||||
v-if="isIndependent"
|
v-if="isIndependent && hasRegisteredClocks"
|
||||||
class="c-conductor__mode-select"
|
class="c-conductor__mode-select"
|
||||||
title="Sets the Time Conductor's clock."
|
title="Sets the Time Conductor's clock."
|
||||||
/>
|
/>
|
||||||
<ConductorClock
|
<ConductorClock
|
||||||
v-else
|
v-else-if="hasRegisteredClocks"
|
||||||
class="c-conductor__mode-select"
|
class="c-conductor__mode-select"
|
||||||
title="Sets the Time Conductor's clock."
|
title="Sets the Time Conductor's clock."
|
||||||
/>
|
/>
|
||||||
@ -76,6 +76,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
emits: ['popup-loaded', 'dismiss'],
|
emits: ['popup-loaded', 'dismiss'],
|
||||||
|
data() {
|
||||||
|
const hasRegisteredClocks = this.openmct.time.clocks.size > 0;
|
||||||
|
|
||||||
|
return {
|
||||||
|
hasRegisteredClocks
|
||||||
|
};
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
position() {
|
position() {
|
||||||
const position = {
|
const position = {
|
||||||
|
@ -3,7 +3,14 @@ import { FIXED_MODE_KEY, REALTIME_MODE_KEY } from '../../api/time/constants.js';
|
|||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
loadModes() {
|
loadModes() {
|
||||||
this.modes = [FIXED_MODE_KEY, REALTIME_MODE_KEY].map(this.getModeMetadata);
|
const modes = [FIXED_MODE_KEY];
|
||||||
|
const clockCount = this.openmct.time.clocks.size;
|
||||||
|
|
||||||
|
if (clockCount > 0) {
|
||||||
|
modes.push(REALTIME_MODE_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.modes = modes.map(this.getModeMetadata);
|
||||||
},
|
},
|
||||||
getModeMetadata(mode, testIds = false) {
|
getModeMetadata(mode, testIds = false) {
|
||||||
let modeOptions;
|
let modeOptions;
|
||||||
|
@ -65,7 +65,14 @@ export function useTimeMode(openmct, timeContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getAllModeMetadata() {
|
function getAllModeMetadata() {
|
||||||
return [FIXED_MODE_KEY, REALTIME_MODE_KEY].map(getModeMetadata);
|
const clockCount = openmct.time.clocks.size;
|
||||||
|
const modes = [FIXED_MODE_KEY];
|
||||||
|
|
||||||
|
if (clockCount > 0) {
|
||||||
|
modes.push(REALTIME_MODE_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
|
return modes.map(getModeMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getModeMetadata(key) {
|
function getModeMetadata(key) {
|
||||||
|
Loading…
Reference in New Issue
Block a user