soanvig / mm-jsr

Range input solution without dependencies
https://soanvig.github.io/mm-jsr
GNU Lesser General Public License v3.0
56 stars 16 forks source link

fault of the sum of values #41

Closed plumthedev closed 5 years ago

plumthedev commented 5 years ago

the most of mathematical activities is good as possible but right now i got this https://ibb.co/k5FwcNp it does not look the best, adding numbers in js has its drawbacks

soanvig commented 5 years ago

Gonna look at it soon.

If you want You may also create PR with fix.

soanvig commented 5 years ago

BTW please provide me with your JSR configuration :)

plumthedev commented 5 years ago

this is my config, i disabled grid because turned out to be unnecessary

var rangeSlider = new JSR(['#jsr-1-1', '#jsr-1-2'], {
    min: 0,
    max: 350000,
    step: 5000,
    sliders: 2,
    values: [0, 350000],
    labels: {
        formatter: (value) => {
            let newVal = null;
            if(value > 1000){
                newVal = value / 1000 + ' 000 pkt';

                return newVal;
            }

            return value + ' pkt';
        } 
    },
    modules: {
        grid: false
    }
});

I can take care of this fix and create pr