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

Add access to the Element attributes related to scrolling #2338

Merged
merged 12 commits into from May 21, 2024

Conversation

ASR-ASU
Copy link
Contributor

@ASR-ASU ASR-ASU commented Apr 18, 2024

@ealmloff ealmloff added breaking This is a breaking change html Related to the html crate enhancement New feature or request and removed breaking This is a breaking change labels Apr 19, 2024
@ealmloff
Copy link
Member

ealmloff commented May 16, 2024

Thanks for adding these methods! They would be great to support in dioxus.

Instead of exposing the browser methods directly, we could merge some of the methods into more rusty versions like we do with other event methods today. Maybe something like this:

  • get_scroll_offset that returns Vector2D
  • get_scroll_size that returns Size2D

@ASR-ASU
Copy link
Contributor Author

ASR-ASU commented May 19, 2024

Should I rather use (or add new ones) the primitives defined by the https://github.com/DioxusLabs/dioxus/blob/main/packages/html/src/geometry.rs instead of euclid types directly?

@ealmloff
Copy link
Member

Should I rather use (or add new ones) the primitives defined by the https://github.com/DioxusLabs/dioxus/blob/main/packages/html/src/geometry.rs instead of euclid types directly?

Reusing the unit type definitions from geometry would be great

@ASR-ASU ASR-ASU force-pushed the asr/add-scrolling-attributes branch 2 times, most recently from 0bddca9 to 9729899 Compare May 21, 2024 16:07
Copy link
Member

@ealmloff ealmloff left a comment

Choose a reason for hiding this comment

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

Thank you, this looks great!

@ealmloff ealmloff merged commit 460b70e into DioxusLabs:main May 21, 2024
9 checks passed
@ASR-ASU ASR-ASU deleted the asr/add-scrolling-attributes branch May 21, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request html Related to the html crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants