Update Conductor.vue (#4150)

* checking for NaN on pan

Lint resolved

Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
This commit is contained in:
Jon Ander Oribe 2021-10-12 23:04:58 +02:00 committed by GitHub
parent 1b13965200
commit 4d8db8eb7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,13 +168,16 @@ export default {
}
},
zoom(bounds) {
this.isZooming = true;
this.formattedBounds.start = this.timeFormatter.format(bounds.start);
this.formattedBounds.end = this.timeFormatter.format(bounds.end);
if (isNaN(bounds.start) || isNaN(bounds.end)) {
this.isZooming = false;
} else {
this.isZooming = true;
this.formattedBounds.start = this.timeFormatter.format(bounds.start);
this.formattedBounds.end = this.timeFormatter.format(bounds.end);
}
},
endZoom(bounds) {
this.isZooming = false;
if (bounds) {
this.openmct.time.bounds(bounds);
} else {