nouislider

angular 2 nouislider: How to recreate the slider?

寵の児 提交于 2019-12-12 04:12:02
问题 I need to change the number of handles on a slider. When googling it says I need to destroy and create the slider again. Now it says here: Updating and reading slider options that: To update any other option, destroy the slider using slider.noUiSlider.destroy() and create a new one. Note that events are not unbound when destroying a slider. I was able to destroy the slider: @ViewChild('slider') slider; destroySlider() { this.slider.slider.destroy(); } but I can't seem to find how to create

Meteor: How to initialize noUiSlider in Meteor?

爷,独闯天下 提交于 2019-12-12 02:18:44
问题 The js code to initialize it is easy to find: Template.templateOne.onRendered(function(){ noUiSlider.create(document.getElementById('slider'), { connect: "lower", range: { min: 0, max: 100 }, start: 50 }); }); Could someone just give me the corresponding html? I tried just a div with id='slider' and I tried copying all the divs from the example sites via Chrome's inspect function. Neither worked :( 回答1: First, you need to add the npm package. meteor npm install --save nouislider Create you

Knockout, noUiSlider, custom bindings

痴心易碎 提交于 2019-12-11 10:26:35
问题 I am trying to meld knockout and noUiSlider with a custom binding. I have found similar code for the jQuery-UI slider and Knockout and used that as a basis. If I use the sliderko custom binding below, the noUisliders do not update the observables. I get NaN, and nothing in the input fields. If I use the slider custom binding below with noUiSlider events directly, then everything works. The slider custom binding doesn't perform well, probably due to tracking the noUiSlider update event.

Customize labels to an exponential text format on a vertical noUiSliderInput in R Shiny

北城余情 提交于 2019-12-11 07:48:48
问题 I'm using a vertical noUiSliderInput in my app I would like to replace the labels, defined in pips of noUiSliderInput from regular numbers to text strings that are 10^x , where x is the original label. The slider has the following properties (some background info): It is build as uiOutput in my server It is linear, but is next to a logarithmic ggplot . Therefore I made the sliders values actually the "power numbers" to run from for instance -1 to 3 if my actual data has a range of 0.1 (10^-1)

Customize noUiSlider handle with text and shape into circle

一曲冷凌霜 提交于 2019-12-11 04:40:57
问题 I'm just now becoming familiar with the noUiSlider and I googled to find examples of what exists out there with different ways to use it. Unfortunately most were adding custom images instead of adding text. Does anyone know where or have some examples of how to design the handle in a unique way using the css or js files? 回答1: All handle styling is on the class .noUi-handle . The 'carving' on the handle is done using the :before and :after pseudo elements. You could use these elements and

For NoUiSlider, how do I set the width of a handle/thumb?

99封情书 提交于 2019-12-11 03:13:14
问题 I have attempted to set the width of a NoUiSlider via the css: .noUi-horizontal .noUi-handle { width:8px; height:25px; left: 0px; top: -8px; border: 0px solid #000000; border-radius: 0px; background: #000; cursor: default; box-shadow: none; /*inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #BBB;*/ } .noUi-handle { left:0px; } .noUi-active { box-shadow: none /*inset 0 0 1px #FFF, inset 0 1px 7px #DDD, 0 3px 6px -3px #BBB;*/ } .noUi-handle:before, .noUi-handle:after { content: "";

formatting the tooltip in noUISlider

北城以北 提交于 2019-12-10 23:22:21
问题 I am using the noUISlider in my rails project. noUiSlider.create( slider, { start: [3], connect: 'lower', step: 1, range: { 'min': 1, 'max': 9 }, pips: { mode: 'steps', density: 20 }, tooltips: true, format: { from: function(value) { return (parseInt(value)+" days"); }, to: function(value) { return (parseInt(value)+" days"); } } }); I want it to be a measure of days in the tooltip. So I added the format part as above. But start: 3 wont work anymore. It starts from 1 instead. If I remove the

noUiSlider custom formatting time with libLink

一曲冷凌霜 提交于 2019-12-08 05:55:20
问题 Custom formatting plus libLink of a time value in noUiSlider does not work for me as expected. I want to use the slider to output a time in 24 hours format (like 17:32). I also want to enter a valid time and have the slider updated via libLink. When I move the slider, the time in the input is correctly updated. But it does not work the other way around: entering a new time in the input and then unfocusing resets the input to the previous value. If you uncomment the console.log in function

noUiSlider custom formatting time with libLink

寵の児 提交于 2019-12-07 15:52:28
Custom formatting plus libLink of a time value in noUiSlider does not work for me as expected. I want to use the slider to output a time in 24 hours format (like 17:32). I also want to enter a valid time and have the slider updated via libLink. When I move the slider, the time in the input is correctly updated. But it does not work the other way around: entering a new time in the input and then unfocusing resets the input to the previous value. If you uncomment the console.log in function HHMMtoMinutes() you can see it firing twice. What is happening here? $(document).ready(function() { $("