Fixed range slider rendering when value is out of range.

If the value of a ranged slider is out of range, the slider will snap to either 0% or 100%.
Reduced memory label margin to preserve sufficient spacing.
This commit is contained in:
Daniel Scalzi 2018-06-21 21:04:10 -04:00
parent 9769458499
commit 4196856d31
No known key found for this signature in database
GPG Key ID: 5CA2F145B63535F9
2 changed files with 7 additions and 1 deletions

View File

@ -1422,7 +1422,7 @@ input:checked + .toggleSwitchSlider:before {
/* Label which displays a memory slider's value. */
.settingsMemoryLabel {
font-size: 14px;
margin-right: 3%;
margin-right: 2%;
}
/* Range sliders for min and max memory settings. */

View File

@ -588,6 +588,12 @@ function updateRangedSlider(element, value, notch){
element.setAttribute('value', value)
if(notch < 0){
notch = 0
} else if(notch > 100) {
notch = 100
}
const event = new MouseEvent('change', {
target: element,
type: 'change',