We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ae9e0c commit d18c917Copy full SHA for d18c917
packages/embla-carousel/src/components/Engine.ts
@@ -109,7 +109,7 @@ export function Engine(
109
} = options
110
111
// Measurements
112
- const pixelTolerance = 2
+ const pixelTolerance = isSsr ? 0 : 2
113
const containerRect = nodeHandler.getRect(container)
114
const slideRects = slides.map(nodeHandler.getRect)
115
const axis = Axis(scrollAxis, direction)
packages/embla-carousel/src/components/ScrollContain.ts
@@ -21,7 +21,7 @@ export function ScrollContain(
21
const snapsContained = measureContained()
22
23
function usePixelTolerance(bound: number, snap: number): boolean {
24
- return deltaAbs(bound, snap) <= 1
+ return pixelTolerance ? deltaAbs(bound, snap) <= 1 : false
25
}
26
27
function findScrollContainLimit(): LimitType {
0 commit comments