fix map slider
This commit is contained in:
@@ -201,8 +201,7 @@ export function Slider({ mapPoint }: { mapPoint?: IMapProject[] }) {
|
|||||||
<button
|
<button
|
||||||
className="p-[0.556vw] absolute cursor-pointer disabled:hidden right-0 top-0 translate-y-[calc(3.889vw/2+1.667vw-50%)]"
|
className="p-[0.556vw] absolute cursor-pointer disabled:hidden right-0 top-0 translate-y-[calc(3.889vw/2+1.667vw-50%)]"
|
||||||
disabled={
|
disabled={
|
||||||
sliderOffset ===
|
sliderOffset >= (3.889 + 0.278) * ((mapPoint?.length ?? 5) - 5)
|
||||||
(3.889 + 0.278) * Math.trunc(mapPoint.length / 5) * 5
|
|
||||||
}
|
}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setSliderOffset((prev) => prev + 5 * (3.889 + 0.278))
|
setSliderOffset((prev) => prev + 5 * (3.889 + 0.278))
|
||||||
|
|||||||
Reference in New Issue
Block a user