Skip to content

Commit

Permalink
fix: expose scrollPosition on root, image, and svg
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed May 20, 2024
1 parent 465c14a commit a656b61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/uikit/src/components/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions packages/uikit/src/components/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ export function createRoot(
})

return Object.assign(flexState, {
scrollPosition,
mergedProperties,
anyAncestorScrollable: flexState.scrollable,
clippingRect: computedClippingRect(identityMatrix, flexState, pixelSize, undefined),
Expand Down
1 change: 1 addition & 0 deletions packages/uikit/src/components/svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit a656b61

Please sign in to comment.