Skip to content

Commit

Permalink
Add lookahead padding to the plan time axis (#3419)
Browse files Browse the repository at this point in the history
* Adds 50% padding to the viewBounds.

Co-authored-by: Andrew Henry <[email protected]>
  • Loading branch information
shefalijoshi and akhenry authored Mar 29, 2021
1 parent e83cfa2 commit b4a87dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/plan/Plan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ export default {
},
updateViewBounds() {
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) {
this.timeSystem = this.openmct.time.timeSystem();
}
Expand Down
Empty file removed src/plugins/timeline/Plan.vue
Empty file.

0 comments on commit b4a87dd

Please sign in to comment.