Skip to content

Commit

Permalink
Refactoring timeseries. addresses #684
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsielicki committed Mar 22, 2017
1 parent 985f707 commit 74acde0
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ define("slycat-timeseries-waveformplot", ["d3", "knob"], function(d3, knob)
"server-root" : "",
mid : null,
waveforms : null, // Time & value data for all waveforms, not just the visible ones
selection : undefined, // Array of ids of waveforms that are visible
selection : null, // Array of ids of waveforms that are visible
highlight : [],
color_array : null,
color_scale : null,
Expand Down Expand Up @@ -208,7 +208,7 @@ define("slycat-timeseries-waveformplot", ["d3", "knob"], function(d3, knob)

// Set all waveforms to visible if this options has not been set
var visible = this.options.selection;
if(visible === undefined) {
if(visible === null) {
visible = [];
for(var i=0; i<this.waveforms.length; i++) {
visible.push(this.waveforms[i]["input-index"]);
Expand Down Expand Up @@ -678,7 +678,7 @@ define("slycat-timeseries-waveformplot", ["d3", "knob"], function(d3, knob)

this.options.waveforms = value.waveforms;
// Setting selection to all if it's undefined
if(value.selection === undefined) {
if(value.selection === null) {
visible = [];
for(var i=0; i<this.options.waveforms.length; i++) {
visible.push(this.options.waveforms[i]["input-index"]);
Expand Down
Loading

0 comments on commit 74acde0

Please sign in to comment.