File tree Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -515,20 +515,26 @@ export const compute = (target: Element, options: Options): ScrollAction[] => {
515
515
516
516
const { scrollLeft, scrollTop } = frame
517
517
// 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
+ )
532
538
533
539
// Cache the offset so that parent frames can scroll this into view correctly
534
540
targetBlock += scrollTop - blockScroll
You can’t perform that action at this time.
0 commit comments