##// END OF EJS Templates
Ignore the event object for handleTextChange
Ignore the event object for handleTextChange

File last commit:

r17953:c6ecc987
r17955:cdab7644
Show More
widget_float.js
34 lines | 974 B | application/javascript | JavascriptLexer
Jonathan Frederic
Almost done!...
r17198 // Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672
Jonathan Frederic
Almost done!...
r17198 define([
"widgets/js/widget",
"widgets/js/widget_int",
], function(widget, int_widgets){
var IntSliderView = int_widgets.IntSliderView;
var IntTextView = int_widgets.IntTextView;
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672
Jonathan Frederic
Float widget views now inherit from int counterparts
r14694 var FloatSliderView = IntSliderView.extend({
Gordon Ball
Add support to the float slider
r17953 _validate_text_input: function(x) {
return parseFloat(x);
},
Jonathan Frederic
Float widget views now inherit from int counterparts
r14694 _validate_slide_value: function(x) {
// Validate the value of the slider before sending it to the back-end
// and applying it to the other views on the page.
return x;
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672 },
});
MinRK
quick review pass on javascript
r14792 var FloatTextView = IntTextView.extend({
Jonathan Frederic
Float widget views now inherit from int counterparts
r14694 _parse_value: function(value) {
// Parse the value stored in a string.
return parseFloat(value);
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672 },
});
Jonathan Frederic
Almost done!...
r17198
return {
'FloatSliderView': FloatSliderView,
'FloatTextView': FloatTextView,
};
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672 });