##// END OF EJS Templates
Tighten up vertical spacing of notebook list.
Tighten up vertical spacing of notebook list.

File last commit:

r14792:de90ea18
r15074:66c2d0d0
Show More
widget_float.js
42 lines | 1.4 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Added standard IPY JS header to widget JS files.
r14366 //----------------------------------------------------------------------------
// Copyright (C) 2013 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672 //============================================================================
// FloatWidget
//============================================================================
/**
* @module IPython
* @namespace IPython
**/
Jonathan Frederic
Float widget views now inherit from int counterparts
r14694 define(["notebook/js/widgets/widget",
"notebook/js/widgets/widget_int"],
function(WidgetManager, int_widgets){
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672
Jonathan Frederic
Float widget views now inherit from int counterparts
r14694 var IntSliderView = int_widgets[0];
var IntTextView = int_widgets[1];
Jonathan Frederic
Move js *RangeWidget code into *Widget
r14672
Jonathan Frederic
Float widget views now inherit from int counterparts
r14694 var FloatSliderView = IntSliderView.extend({
_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 },
});
WidgetManager.register_widget_view('FloatSliderView', FloatSliderView);
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 },
});
WidgetManager.register_widget_view('FloatTextView', FloatTextView);
});