How to use the @jupyter-widgets/controls.FloatRangeSliderModel function in @jupyter-widgets/controls

To help you get started, we’ve selected a few @jupyter-widgets/controls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github martinRenou / Odysis / js / lib / src / slider.js View on Github external
handleSliderChange: function(e, ui) {
        this.readout.textContent = this.valueToString(this._validate_slide_value(ui.value));

        if (this.model.get('continuous_update')) {
            this.handleSliderChanged(e, ui);
        }
    },

    handleSliderChanged: function(e, ui) {
        this.model.set('value', this._validate_slide_value(ui.value), {updated_view: this});
        this.touch();
    }
});

let FixedFloatRangeSliderModel = widgets_ctrl.FloatRangeSliderModel.extend({
    defaults: _.extend({}, widgets_ctrl.FloatRangeSliderModel.prototype.defaults, {
        _model_name : 'FixedFloatRangeSliderModel',
        _view_name : 'FixedFloatRangeSliderView',
        _model_module : 'odysis',
        _view_module : 'odysis',
        _model_module_version : odysis_version,
        _view_module_version : odysis_version
    })
});

let FixedFloatRangeSliderView = widgets_ctrl.FloatRangeSliderView.extend(FixedFloatSliderBaseView).extend({
    render: function() {
        FixedFloatRangeSliderView.__super__.render.apply(this, arguments);

        this.$slider.slider('option', 'min', 0);
        this.$slider.slider('option', 'max', 1);
    },
github martinRenou / Odysis / js / lib / src / slider.js View on Github external
handleSliderChange: function(e, ui) {
        this.readout.textContent = this.valueToString(this._validate_slide_value(ui.value));

        if (this.model.get('continuous_update')) {
            this.handleSliderChanged(e, ui);
        }
    },

    handleSliderChanged: function(e, ui) {
        this.model.set('value', this._validate_slide_value(ui.value), {updated_view: this});
        this.touch();
    }
});

let FixedFloatRangeSliderModel = widgets_ctrl.FloatRangeSliderModel.extend({
    defaults: _.extend({}, widgets_ctrl.FloatRangeSliderModel.prototype.defaults, {
        _model_name : 'FixedFloatRangeSliderModel',
        _view_name : 'FixedFloatRangeSliderView',
        _model_module : 'odysis',
        _view_module : 'odysis',
        _model_module_version : odysis_version,
        _view_module_version : odysis_version
    })
});

let FixedFloatRangeSliderView = widgets_ctrl.FloatRangeSliderView.extend(FixedFloatSliderBaseView).extend({
    render: function() {
        FixedFloatRangeSliderView.__super__.render.apply(this, arguments);

        this.$slider.slider('option', 'min', 0);
        this.$slider.slider('option', 'max', 1);