//----------------------------------------------------------------------------1// Copyright (C) 2013 The IPython Development Team2//3// Distributed under the terms of the BSD License. The full license is in4// the file COPYING, distributed as part of this software.5//----------------------------------------------------------------------------67//============================================================================8// FloatWidget9//============================================================================1011/**12* @module IPython13* @namespace IPython14**/1516define(["widgets/js/widget",17"widgets/js/widget_int"],18function(WidgetManager, int_widgets){1920var IntSliderView = int_widgets[0];21var IntTextView = int_widgets[1];222324var FloatSliderView = IntSliderView.extend({25_validate_slide_value: function(x) {26// Validate the value of the slider before sending it to the back-end27// and applying it to the other views on the page.28return x;29},30});31WidgetManager.register_widget_view('FloatSliderView', FloatSliderView);323334var FloatTextView = IntTextView.extend({35_parse_value: function(value) {36// Parse the value stored in a string.37return parseFloat(value);38},39});40WidgetManager.register_widget_view('FloatTextView', FloatTextView);41});424344