Fixed: Quality sliders

Broken after 9c635781bd
This commit is contained in:
Mark McDowall 2020-10-06 08:26:20 -07:00
parent d105dd47e0
commit 9dab2ba6e4
2 changed files with 27 additions and 6 deletions

View File

@ -24,7 +24,7 @@
height: 20px;
}
.bar {
.track {
top: 9px;
margin: 0 5px;
height: 3px;
@ -36,7 +36,7 @@
}
}
.handle {
.thumb {
top: 1px;
z-index: 0 !important;
width: 18px;

View File

@ -68,6 +68,27 @@ class QualityDefinition extends Component {
}
}
//
// Control
trackRenderer(props, state) {
return (
<div
{...props}
className={styles.track}
/>
);
}
thumbRenderer(props, state) {
return (
<div
{...props}
className={styles.thumb}
/>
);
}
//
// Listeners
@ -162,16 +183,16 @@ class QualityDefinition extends Component {
<div className={styles.sizeLimit}>
<ReactSlider
className={styles.slider}
min={slider.min}
max={slider.max}
step={slider.step}
minDistance={10}
value={[sliderMinSize, sliderMaxSize]}
withBars={true}
withTracks={true}
snapDragDisabled={true}
className={styles.slider}
barClassName={styles.bar}
handleClassName={styles.handle}
renderThumb={this.thumbRenderer}
renderTrack={this.trackRenderer}
onChange={this.onSliderChange}
onAfterChange={this.onAfterSliderChange}
/>