taborlab / Iris

The Light Program Interface
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

Waveforms are not cleared from plate/well view after they are deleted from an experiment #251

Closed SynbioLucas closed 8 years ago

SynbioLucas commented 8 years ago

Example: Added some constant waveforms, then removed them, yet they persist in plate view (and well view).

capture

SynbioLucas commented 8 years ago

Stack trace:

TypeError: Cannot read property 'length' of undefined
    at waveformParsing (http://rice-bioe.github.io/Iris/js/form/formServices.js:1188:55)
    at parseInputs (http://rice-bioe.github.io/Iris/js/form/formServices.js:1178:46)
    at new WellArrangement (http://rice-bioe.github.io/Iris/js/form/formServices.js:1126:9)
    at Experiment.<anonymous> (http://rice-bioe.github.io/Iris/js/form/formServices.js:941:41)
    at Function.n.extend.each (http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:2:2880)
    at n.fn.n.each (http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js:2:847)
    at parsePlate (http://rice-bioe.github.io/Iris/js/form/formServices.js:940:29)
    at new Plate (http://rice-bioe.github.io/Iris/js/form/formServices.js:885:5)
    at Object.fn (http://rice-bioe.github.io/Iris/js/form/formControllers.js:212:27)
    at l.$digest (http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js:123:138)
BrianLandry commented 8 years ago

This occurs when Waveforms are set to add not combine. When waveforms are set to add waveforms[0].length is called even when there is no waveform at waveform[0] throwing an error. This error causes the plate not to update, therefore it remains as it used to look. The code should fixed so this error isn't thrown.

SynbioLucas commented 8 years ago

Now that much of the code has been refactored, I can no longer reproduce this bug.