Independent time contexts follow upstream contexts as needed (#4556)

* Update independent time context APIs to follow upstream time contexts as necessary
* Removes boilerplate from views.
This commit is contained in:
Shefali Joshi
2021-12-13 13:28:17 -08:00
committed by GitHub
parent 82ea23e20c
commit 2488072d6b
14 changed files with 215 additions and 52 deletions

View File

@ -110,7 +110,6 @@ export default {
setTimeContext() {
this.stopFollowingTimeContext();
this.timeContext = this.openmct.time.getContextForView(this.keyString ? [{identifier: this.keyString}] : []);
this.timeContext.on('timeContext', this.setTimeContext);
this.handleNewBounds(this.timeContext.bounds());
this.timeContext.on('bounds', this.handleNewBounds);
@ -120,7 +119,6 @@ export default {
if (this.timeContext) {
this.timeContext.off('bounds', this.handleNewBounds);
this.timeContext.off('clock', this.clearAllValidation);
this.timeContext.off('timeContext', this.setTimeContext);
}
},
handleNewBounds(bounds) {