mirror of
https://github.com/nasa/openmct.git
synced 2025-05-02 16:53:24 +00:00
Add lookahead padding to the plan time axis (#3419)
* Adds 50% padding to the viewBounds. Co-authored-by: Andrew Henry <akhenry@gmail.com>
This commit is contained in:
parent
e83cfa24c2
commit
b4a87dd07f
@ -122,6 +122,11 @@ export default {
|
|||||||
},
|
},
|
||||||
updateViewBounds() {
|
updateViewBounds() {
|
||||||
this.viewBounds = this.openmct.time.bounds();
|
this.viewBounds = this.openmct.time.bounds();
|
||||||
|
//Add a 50% padding to the end bounds to look ahead
|
||||||
|
let timespan = (this.viewBounds.end - this.viewBounds.start);
|
||||||
|
let padding = timespan / 2;
|
||||||
|
this.viewBounds.end = this.viewBounds.end + padding;
|
||||||
|
|
||||||
if (this.timeSystem === undefined) {
|
if (this.timeSystem === undefined) {
|
||||||
this.timeSystem = this.openmct.time.timeSystem();
|
this.timeSystem = this.openmct.time.timeSystem();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user