diff --git a/nengo_gui/static/components/netgraph.js b/nengo_gui/static/components/netgraph.js index 8b50075c..18c1ed31 100644 --- a/nengo_gui/static/components/netgraph.js +++ b/nengo_gui/static/components/netgraph.js @@ -70,6 +70,17 @@ Nengo.NetGraph = function(parent, args) { } }); + Object.defineProperty(this, 'kept_time', { + get: function() { + return Nengo.config.kept_time; + }, + set: function(val) { + if (val === this.kept_time) { return; } + Nengo.config.kept_time = val; + sim.time_slider.update_kept_time(val); + } + }); + // Do networks have transparent backgrounds? Object.defineProperty(this, 'transparent_nets', { get: function() { diff --git a/nengo_gui/static/config.js b/nengo_gui/static/config.js index 4bc75b4b..acee34de 100644 --- a/nengo_gui/static/config.js +++ b/nengo_gui/static/config.js @@ -26,6 +26,7 @@ Nengo.Config = function(parent, args) { define_option("aspect_resize", false); define_option("zoom_fonts", false); define_option("font_size", 100); + define_option("kept_time", 4); // Ace editor options define_option("hide_editor", false); diff --git a/nengo_gui/static/modal.js b/nengo_gui/static/modal.js index 0eac0940..d8d7dd4b 100644 --- a/nengo_gui/static/modal.js +++ b/nengo_gui/static/modal.js @@ -181,6 +181,10 @@ Nengo.Modal.prototype.tabbed_body = function(tabinfo) { Nengo.Modal.prototype.main_config = function() { this.clear_body(); + // Range on time kept, currently picked arbitrarily + var min_kept_time = 1; + var max_kept_time = 10; + var $form = $('
').appendTo(this.$body); $('
' + @@ -196,6 +200,21 @@ Nengo.Modal.prototype.main_config = function() { 'As a percentage of' + ' the base size' + '
' + + '
' + + '' + + '
' + + '' + + 's' + + '
' + + 'Amount of data to' + + ' save on the time slider' + + '
' + '
' + '
' + '