mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +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 = {
|
||||
to: function (value) {
|
||||
return arbitraryValuesForSlider[Math.round(value)];
|
||||
return arbitraryValuesForSlider[Math.round(value)]
|
||||
},
|
||||
from: function (value) {
|
||||
return arbitraryValuesForSlider.indexOf(value);
|
||||
return arbitraryValuesForSlider.indexOf(value)
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
noUiSlider.create(slider, {
|
||||
// start values are parsed by 'format'
|
||||
@@ -19,4 +19,4 @@ noUiSlider.create(slider, {
|
||||
tooltips: true,
|
||||
format: format,
|
||||
pips: { mode: 'steps', format: format, density: 50 },
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user