fix(slider): fix incorrect placement of dot
parent
aa211fd789
commit
241461cc57
|
@ -53,8 +53,8 @@ const Steps = (_: any, { attrs }) => {
|
||||||
(!included && point === upperBound) ||
|
(!included && point === upperBound) ||
|
||||||
(included && point <= upperBound && point >= lowerBound);
|
(included && point <= upperBound && point >= lowerBound);
|
||||||
let style = vertical
|
let style = vertical
|
||||||
? { ...dotStyle, [reverse ? 'top' : 'bottom']: offset }
|
? { ...dotStyle, [reverse ? 'top' : 'bottom']: offset, transform: 'translateY(50%)' }
|
||||||
: { ...dotStyle, [reverse ? 'right' : 'left']: offset };
|
: { ...dotStyle, [reverse ? 'right' : 'left']: offset, transform: 'translateX(-50%)' };
|
||||||
if (isActived) {
|
if (isActived) {
|
||||||
style = { ...style, ...activeDotStyle };
|
style = { ...style, ...activeDotStyle };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue