From 43f23c53936d3aaeb0f5ab5fbe59919014f15bbf 2014-07-20 07:53:20 From: Tarun Gaba Date: 2014-07-20 07:53:20 Subject: [PATCH] The value of slider changes in frontend, and readout, but not in python obj. --- diff --git a/IPython/html/static/widgets/js/widget_int.js b/IPython/html/static/widgets/js/widget_int.js index cc287b4..fe48e15 100644 --- a/IPython/html/static/widgets/js/widget_int.js +++ b/IPython/html/static/widgets/js/widget_int.js @@ -68,8 +68,13 @@ define([ this.$slider.slider('option', 'value', min); this.$slider.slider('option', 'orientation', orientation); value = this.model.get('value'); - if(value > max) value = max; - else if(value < min) value = min; + if(value > max) { + value = max; + } + else if(value < min){ + value = min; + } + this.model.set('value', value, {updated_view: this}); this.$slider.slider('option', 'value', value); this.$readout.text(value);