Skip to content

Commit 9e7f63d

Browse files
chore(prettier): 🤖 ✨
1 parent ffad204 commit 9e7f63d

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

‎src/index.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -515,20 +515,26 @@ export const compute = (target: Element, options: Options): ScrollAction[] => {
515515

516516
const { scrollLeft, scrollTop } = frame
517517
// Ensure scroll coordinates are not out of bounds while applying scroll offsets
518-
blockScroll = scaleY === 0 ? 0 : Math.max(
519-
0,
520-
Math.min(
521-
scrollTop + blockScroll / scaleY,
522-
frame.scrollHeight - height / scaleY + scrollbarHeight
523-
)
524-
)
525-
inlineScroll = scaleX === 0 ? 0 :Math.max(
526-
0,
527-
Math.min(
528-
scrollLeft + inlineScroll / scaleX,
529-
frame.scrollWidth - width / scaleX + scrollbarWidth
530-
)
531-
)
518+
blockScroll =
519+
scaleY === 0
520+
? 0
521+
: Math.max(
522+
0,
523+
Math.min(
524+
scrollTop + blockScroll / scaleY,
525+
frame.scrollHeight - height / scaleY + scrollbarHeight
526+
)
527+
)
528+
inlineScroll =
529+
scaleX === 0
530+
? 0
531+
: Math.max(
532+
0,
533+
Math.min(
534+
scrollLeft + inlineScroll / scaleX,
535+
frame.scrollWidth - width / scaleX + scrollbarWidth
536+
)
537+
)
532538

533539
// Cache the offset so that parent frames can scroll this into view correctly
534540
targetBlock += scrollTop - blockScroll

0 commit comments

Comments
 (0)