diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-02 10:57:40 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-02 10:57:40 +0200 |
| commit | 06f2e600b1b87c7d738c7f0645ea3f2a25fbbe29 (patch) | |
| tree | 4f65afca68a4fe98721c156eb1546b1e4c677b95 /code | |
| parent | c3338d84e6983fb4e6440bca0538fbf6795000c3 (diff) | |
| download | vortrag-knn-06f2e600b1b87c7d738c7f0645ea3f2a25fbbe29.tar.gz vortrag-knn-06f2e600b1b87c7d738c7f0645ea3f2a25fbbe29.zip | |
simplify weightVis usage
Diffstat (limited to 'code')
| -rw-r--r-- | code/weightvis.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/code/weightvis.js b/code/weightvis.js index f777755..5265cee 100644 --- a/code/weightvis.js +++ b/code/weightvis.js @@ -288,12 +288,13 @@ var NetVisualizer = (function() { }; NetVisualizer.prototype.stopAnimation = function() { - this.animator.stop(); + if (this.animator) this.animator.stop(); }; NetVisualizer.prototype.animate = function(animationTime, resolution, step) { // animationTime in seconds per frame // resolution in epochs per frame + if (!step) step = 0; var self = this; var batch = Math.floor(step / this.layout.data.epochs), epoch = step % this.layout.data.epochs; |
