Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make GeometryProxy.environment public #515

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

g-mark
Copy link
Contributor

@g-mark g-mark commented Oct 18, 2024

Makes the environment property of GeometryReader public.

The immediate need for this is to enable the use of displayScale values inside of GeometryReader calculations.

@g-mark g-mark requested a review from a team as a code owner October 18, 2024 10:59
Copy link
Collaborator

@kyleve kyleve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this hurts at all, but you could also wrap the returned element in an EnvironmentReader { env in ... } to get to the env as well.

@g-mark
Copy link
Contributor Author

g-mark commented Oct 18, 2024

I don't think this hurts at all, but you could also wrap the returned element in an EnvironmentReader { env in ... } to get to the env as well.

Yes, that's right, although it would result in nested blocks to get at both of them. @watt and I did discuss this, and he recommended making the environment public.

Copy link
Collaborator

@watt watt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • update the changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants