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

Prefer the client width/height for the canvas parent #2804

Merged
merged 2 commits into from
Mar 29, 2023
Merged

Prefer the client width/height for the canvas parent #2804

merged 2 commits into from
Mar 29, 2023

Conversation

samitbasu
Copy link
Contributor

@samitbasu samitbasu commented Mar 13, 2023

Normally, eframe takes over the entire webpage, but sometimes, you
would like it to "play nice" and keep its canvas to a finite area. This mostly
works as long as the containing div has the right style properties.
However, the use of scrollheight and scrollwidth breaks the responsive case in which the page is resized. The canvas will grow, but it will not shrink.

This PR resolves #2805

@samitbasu
Copy link
Contributor Author

Yeah - I'm not sure what to do about the cargo deny warnings.

@samitbasu
Copy link
Contributor Author

I resync-ed with master. It looks like the cargo deny issues were fixed there.

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Makes sense - thanks for the fix!

@emilk emilk merged commit f389043 into emilk:master Mar 29, 2023
@emilk emilk added web Related to running Egui on the web eframe Relates to epi and eframe labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe web Related to running Egui on the web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change egui canvas resize behavior to play nicer with other html content
2 participants