mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
Merge release 1.8.4 into master (#4797)
* Update version number (#4759) * update copyright (#4775) * Observe changes to sub-objects in flexible layouts. (#4780) * Get child of flex layout as mutable if possible * Fix bug when no default notebook defined * Follow domain object changes for Independent time conductor (#4783) * Track if domain object changes when independent time conductor is in use. * fix typo when using fallback template (#4784) Co-authored-by: Scott Bell <scott@traclabs.com> Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
@ -95,6 +95,11 @@ export default {
|
||||
isUTCBased: timeSystem.isUTCBased
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
keyString() {
|
||||
this.setTimeContext();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
||||
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
|
||||
|
@ -115,6 +115,11 @@ export default {
|
||||
isUTCBased: timeSystem.isUTCBased
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
keyString() {
|
||||
this.setTimeContext();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.handleNewBounds = _.throttle(this.handleNewBounds, 300);
|
||||
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
|
||||
|
@ -105,42 +105,49 @@ export default {
|
||||
watch: {
|
||||
domainObject: {
|
||||
handler(domainObject) {
|
||||
this.independentTCEnabled = domainObject.configuration.useIndependentTime === true;
|
||||
|
||||
if (!domainObject.configuration.timeOptions || !this.independentTCEnabled) {
|
||||
const key = this.openmct.objects.makeKeyString(domainObject.identifier);
|
||||
if (key !== this.keyString) {
|
||||
//domain object has changed
|
||||
this.destroyIndependentTime();
|
||||
|
||||
return;
|
||||
}
|
||||
this.independentTCEnabled = domainObject.configuration.useIndependentTime === true;
|
||||
this.timeOptions = domainObject.configuration.timeOptions || {
|
||||
clockOffsets: this.openmct.time.clockOffsets(),
|
||||
fixedOffsets: this.openmct.time.bounds()
|
||||
};
|
||||
|
||||
if (this.timeOptions.start !== domainObject.configuration.timeOptions.start
|
||||
|| this.timeOptions.end !== domainObject.configuration.timeOptions.end) {
|
||||
this.timeOptions = domainObject.configuration.timeOptions;
|
||||
this.destroyIndependentTime();
|
||||
this.registerIndependentTimeOffsets();
|
||||
this.initialize();
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setTimeContext();
|
||||
|
||||
if (this.timeOptions.mode) {
|
||||
this.mode = this.timeOptions.mode;
|
||||
} else {
|
||||
this.timeOptions.mode = this.mode = this.timeContext.clock() === undefined ? { key: 'fixed' } : { key: Object.create(this.timeContext.clock()).key};
|
||||
}
|
||||
|
||||
if (this.independentTCEnabled) {
|
||||
this.registerIndependentTimeOffsets();
|
||||
}
|
||||
this.initialize();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.stopFollowingTimeContext();
|
||||
this.destroyIndependentTime();
|
||||
},
|
||||
methods: {
|
||||
initialize() {
|
||||
this.keyString = this.openmct.objects.makeKeyString(this.domainObject.identifier);
|
||||
this.setTimeContext();
|
||||
|
||||
if (this.timeOptions.mode) {
|
||||
this.mode = this.timeOptions.mode;
|
||||
} else {
|
||||
if (this.timeContext.clock() === undefined) {
|
||||
this.timeOptions.mode = this.mode = { key: 'fixed' };
|
||||
} else {
|
||||
this.timeOptions.mode = this.mode = { key: Object.create(this.timeContext.clock()).key};
|
||||
}
|
||||
}
|
||||
|
||||
if (this.independentTCEnabled) {
|
||||
this.registerIndependentTimeOffsets();
|
||||
}
|
||||
},
|
||||
toggleIndependentTC() {
|
||||
this.independentTCEnabled = !this.independentTCEnabled;
|
||||
if (this.independentTCEnabled) {
|
||||
@ -213,10 +220,9 @@ export default {
|
||||
offsets = this.timeOptions.clockOffsets;
|
||||
}
|
||||
|
||||
const key = this.openmct.objects.makeKeyString(this.domainObject.identifier);
|
||||
const timeContext = this.openmct.time.getIndependentContext(key);
|
||||
const timeContext = this.openmct.time.getIndependentContext(this.keyString);
|
||||
if (!timeContext.hasOwnContext()) {
|
||||
this.unregisterIndependentTime = this.openmct.time.addIndependentContext(key, offsets, this.isFixed ? undefined : this.mode.key);
|
||||
this.unregisterIndependentTime = this.openmct.time.addIndependentContext(this.keyString, offsets, this.isFixed ? undefined : this.mode.key);
|
||||
} else {
|
||||
if (this.isFixed) {
|
||||
timeContext.stopClock();
|
||||
|
Reference in New Issue
Block a user