decord/source/5418_ScrollAnchor.js

48 lines
1.2 KiB
JavaScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 5418
2026-07-27 11:26:19 +00:00
// Function ID: 46454
2026-07-20 16:05:17 +00:00
// Name: ScrollAnchor
2026-07-23 10:11:24 +00:00
// Dependencies: [5359, 31, 33, 5413]
2026-07-20 16:05:17 +00:00
// Exports: ScrollAnchor
2026-07-23 10:11:24 +00:00
// Module 5418 (ScrollAnchor)
import _slicedToArray from "_slicedToArray";
import result from "result";
import "result";
import { jsx } from "jsxProd";
let closure_3;
let closure_4;
let closure_5;
const require = arg1;
({ useImperativeHandle: closure_3, useMemo: closure_4, useState: closure_5 } = result);
2026-07-20 16:05:17 +00:00
export const ScrollAnchor = function ScrollAnchor(horizontal) {
horizontal = horizontal.horizontal;
const tmp = callback(callback4(1000000), 2);
const first = tmp[0];
2026-07-23 10:11:24 +00:00
callback = tmp[1];
2026-07-20 16:05:17 +00:00
callback2(horizontal.scrollAnchorRef, () => ({
scrollBy(diff) {
2026-07-23 10:11:24 +00:00
let closure_0 = diff;
outer1_2((arg0) => arg0 + closure_0);
2026-07-20 16:05:17 +00:00
}
}), []);
const items = [first, horizontal];
return callback3(() => {
let obj = {};
2026-07-23 10:11:24 +00:00
obj = { position: "absolute", height: 0 };
2026-07-20 16:05:17 +00:00
let num = 0;
if (!horizontal) {
num = first;
}
obj.top = num;
let num2 = 0;
if (horizontal) {
num2 = first;
}
obj.left = num2;
obj.style = obj;
2026-07-23 10:11:24 +00:00
return outer1_6(horizontal(first[3]).CompatView, obj);
2026-07-20 16:05:17 +00:00
}, items);
};