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

Resize to width for embedded WGLMakie panels #3059

Open
kbarros opened this issue Jul 11, 2023 · 0 comments
Open

Resize to width for embedded WGLMakie panels #3059

kbarros opened this issue Jul 11, 2023 · 0 comments
Labels
enhancement Feature requests and enhancements WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.

Comments

@kbarros
Copy link
Contributor

kbarros commented Jul 11, 2023

With #3044, WGLMakie panels can automatically resize to fill an entire panel body. This behavior is opt-in, using

WGLMakie.activate!(;resize_to_body=true)

One common use-case will be embedded panels in VSCode. Here, it is not uncommon to have "tall, narrow" panels. In this case, it may not be desirable to have the WGLMakie panel expand to fill the entire vertical space. In general, I suspect most users will want to see their plots in something like a 1:1 aspect ratio, or similar.

Feature request: WGLMakie could use the minimum of (body-width, body-height) to determine the overall panel size. In case of "tall, narrow" panels, this would lead to empty vertical space below the plot. For inspiration, we could compare with the Plots.jl behavior (seems to use auto-resize via HTML/CSS, with a locked aspect ratio, and imposes a maximum image size).

Some previous discussion here: #3044 (comment).

Also, once this is implemented, should resize_to_body=true be the default?

Any changes to auto-resizing will also need to be tested in Jupyter notebooks and similar, which tend to have "short, wide" panels.

@kbarros kbarros added the enhancement Feature requests and enhancements label Jul 11, 2023
@ffreyer ffreyer added the WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie. label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and enhancements WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.
Projects
None yet
Development

No branches or pull requests

2 participants