From a656b6106ff25f57ae3ffdfe3fcb8c551581f6dc Mon Sep 17 00:00:00 2001 From: Bela Bohlender Date: Mon, 20 May 2024 13:22:03 +0200 Subject: [PATCH] fix: expose scrollPosition on root, image, and svg --- packages/uikit/src/components/image.ts | 1 + packages/uikit/src/components/root.ts | 1 + packages/uikit/src/components/svg.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/uikit/src/components/image.ts b/packages/uikit/src/components/image.ts index 1176f57c..92ea1802 100644 --- a/packages/uikit/src/components/image.ts +++ b/packages/uikit/src/components/image.ts @@ -181,6 +181,7 @@ export function createImage( setupClippedListeners(style, properties, isClipped, initializers) return Object.assign(flexState, { + scrollPosition, isClipped, mergedProperties, anyAncestorScrollable: computedAnyAncestorScrollable(flexState.scrollable, parentContext.anyAncestorScrollable), diff --git a/packages/uikit/src/components/root.ts b/packages/uikit/src/components/root.ts index 2cc51962..fe64549d 100644 --- a/packages/uikit/src/components/root.ts +++ b/packages/uikit/src/components/root.ts @@ -215,6 +215,7 @@ export function createRoot( }) return Object.assign(flexState, { + scrollPosition, mergedProperties, anyAncestorScrollable: flexState.scrollable, clippingRect: computedClippingRect(identityMatrix, flexState, pixelSize, undefined), diff --git a/packages/uikit/src/components/svg.ts b/packages/uikit/src/components/svg.ts index 4d5a2053..f1379c63 100644 --- a/packages/uikit/src/components/svg.ts +++ b/packages/uikit/src/components/svg.ts @@ -182,6 +182,7 @@ export function createSvg( setupClippedListeners(style, properties, isClipped, initializers) return Object.assign(flexState, { + scrollPosition, isClipped, mergedProperties, anyAncestorScrollable: computedAnyAncestorScrollable(flexState.scrollable, parentContext.anyAncestorScrollable),