Resize to width for embedded WGLMakie panels #3059
Labels
enhancement
Feature requests and enhancements
WGLMakie
This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.
With #3044, WGLMakie panels can automatically resize to fill an entire panel body. This behavior is opt-in, using
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.
The text was updated successfully, but these errors were encountered: