Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return min + x * (max - min);
}
};
let FixedFloatSliderModel = widgets_ctrl.FloatSliderModel.extend({
defaults: _.extend({}, widgets_ctrl.FloatSliderModel.prototype.defaults, {
_model_name : 'FixedFloatSliderModel',
_view_name : 'FixedFloatSliderView',
_model_module : 'odysis',
_view_module : 'odysis',
_model_module_version : odysis_version,
_view_module_version : odysis_version
})
});
let FixedFloatSliderView = widgets_ctrl.FloatSliderView.extend(FixedFloatSliderBaseView).extend({
render: function() {
FixedFloatSliderView.__super__.render.apply(this, arguments);
this.$slider.slider('option', 'min', 0);
this.$slider.slider('option', 'max', 1);
},
update: function(options) {
FixedFloatSliderView.__super__.update.apply(this, arguments);
this.$slider.slider('option', 'range', false);
let value = this.model.get('value');
this.$slider.slider('option', 'value', this.scale(value));
},