[Plot] Ignore empty lines

Ignore empty lines (plot lines with no data) when determining
domain extrema; avoids failure to draw multiple plot lines in
a telemetry panel, nasa/openmctweb#150.
This commit is contained in:
Victor Woeltjen
2015-10-23 13:04:06 -07:00
parent 59f094763b
commit 29bdc9d574
2 changed files with 35 additions and 1 deletions

View File

@ -159,7 +159,9 @@ define(
// Update dimensions and origin based on extrema of plots
PlotUpdater.prototype.updateBounds = function () {
var bufferArray = this.bufferArray,
var bufferArray = this.bufferArray.filter(function (lineBuffer) {
return lineBuffer.getLength() > 0; // Ignore empty lines
}),
priorDomainOrigin = this.origin[0],
priorDomainDimensions = this.dimensions[0];