Skip to content

Commit

Permalink
map_howto
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Jan 18, 2024
1 parent 2e4b664 commit e32079a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions website/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,6 @@ hr {
}

#support-plans-slider {
max-width: 600px;
max-width: 600px;
margin: 50px auto;
}
}
34 changes: 17 additions & 17 deletions website/assets/support_plans.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
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)];
},
from: function (value) {
return arbitraryValuesForSlider.indexOf(value);
}
};
to: function (value) {
return arbitraryValuesForSlider[Math.round(value)]
},
from: function (value) {
return arbitraryValuesForSlider.indexOf(value)
},
}

noUiSlider.create(slider, {
// start values are parsed by 'format'
start: '1GB',
range: { min: 0, max: arbitraryValuesForSlider.length - 1 },
step: 1,
tooltips: true,
format: format,
pips: { mode: 'steps', format: format, density: 50 },
});
// start values are parsed by 'format'
start: '1GB',
range: { min: 0, max: arbitraryValuesForSlider.length - 1 },
step: 1,
tooltips: true,
format: format,
pips: { mode: 'steps', format: format, density: 50 },
})

0 comments on commit e32079a

Please sign in to comment.