@@ -305,12 +305,9 @@ class SliderSingleRootState extends SliderBaseRootState {
305
305
const currValue = this . opts . value . current ;
306
306
307
307
return Array . from ( { length : count } , ( _ , i ) => {
308
- const tickPosition = i * ( step / difference ) * 100 ;
308
+ const tickPosition = i * step ;
309
309
310
- const scale = linearScale (
311
- [ this . opts . min . current , this . opts . max . current ] ,
312
- this . getThumbScale ( )
313
- ) ;
310
+ const scale = linearScale ( [ 0 , ( count - 1 ) * step ] , this . getThumbScale ( ) ) ;
314
311
315
312
const isFirst = i === 0 ;
316
313
const isLast = i === count - 1 ;
@@ -623,12 +620,15 @@ class SliderMultiRootState extends SliderBaseRootState {
623
620
const currValue = this . opts . value . current ;
624
621
625
622
return Array . from ( { length : count } , ( _ , i ) => {
626
- const tickPosition = i * ( step / difference ) * 100 ;
623
+ const tickPosition = i * step ;
624
+
625
+ const scale = linearScale ( [ 0 , ( count - 1 ) * step ] , this . getThumbScale ( ) ) ;
627
626
628
627
const isFirst = i === 0 ;
629
628
const isLast = i === count - 1 ;
630
629
const offsetPercentage = isFirst ? 0 : isLast ? - 100 : - 50 ;
631
- const style = getTickStyles ( this . direction , tickPosition , offsetPercentage ) ;
630
+
631
+ const style = getTickStyles ( this . direction , scale ( tickPosition ) , offsetPercentage ) ;
632
632
const tickValue = min + i * step ;
633
633
const bounded =
634
634
currValue . length === 1
0 commit comments