mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 06:22:16 +00:00
map_howto
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
const slider = document.getElementById('support-plans-slider');
|
const slider = document.getElementById('support-plans-slider')
|
||||||
|
|
||||||
var arbitraryValuesForSlider = ['128MB', '256MB', '1GB', '8GB', '16GB', '32GB'];
|
var arbitraryValuesForSlider = ['128MB', '256MB', '1GB', '8GB', '16GB', '32GB']
|
||||||
|
|
||||||
var format = {
|
var format = {
|
||||||
to: function(value) {
|
to: function (value) {
|
||||||
return arbitraryValuesForSlider[Math.round(value)];
|
return arbitraryValuesForSlider[Math.round(value)]
|
||||||
},
|
},
|
||||||
from: function (value) {
|
from: function (value) {
|
||||||
return arbitraryValuesForSlider.indexOf(value);
|
return arbitraryValuesForSlider.indexOf(value)
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
|
|
||||||
noUiSlider.create(slider, {
|
noUiSlider.create(slider, {
|
||||||
// start values are parsed by 'format'
|
// start values are parsed by 'format'
|
||||||
@@ -19,4 +19,4 @@ noUiSlider.create(slider, {
|
|||||||
tooltips: true,
|
tooltips: true,
|
||||||
format: format,
|
format: format,
|
||||||
pips: { mode: 'steps', format: format, density: 50 },
|
pips: { mode: 'steps', format: format, density: 50 },
|
||||||
});
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user