-
Notifications
You must be signed in to change notification settings - Fork 55
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
ExperimentalLayout.hbox creates horizontal overflow and scrollbar if combining plot output with widget #278
Comments
Hi, @schlichtanders. Is it correct that your problem is that the plot is too large in I think the easiest workaround is to specify a size option for the plot. Look at the following image. (The width is specified as 400 pixels with the However, if the width of the drop-down menu is wide, even if you reduce the width of the plot, it may be cut off as shown in the image above. In that case, you may want to use PlutoUI.ExperimentalLayout.vbox(
[choose, plot(rand(10); size=(500,300))];
style=Dict(
"justify-content"=>"center",
"max-width"=>"fit-content",
"margin-left"=>"auto",
"margin-right"=>"auto",
)
) |
Thank you for your response. My problem is that I don't understand why the plot correctly resizes, when the overall pluto width shrinks, but does not resizes when inside an hbox. Hardcoding pixels is no option for me - I need a responsive layout. (Like Pluto itself is). I thought hbox is actually intended to be responsive - then this looks like kind of a bug in hbox. |
Ah, that's what you meant. Sorry. |
Hey! You can wrap the plot in a div with [
chooser,
PlutoUI.ExperimentalLayout.Div([plot]; style=Dict("flex" => "1 1 auto")),
] Maybe this should be the default? I find it a bit difficult to decide on the API of ExpeirmentalLayout, maybe people should just have easy access to the original flex CSS API with no extras... |
It is a bit off topic, but to give comment to your last question about the design of ExperimentalLayout: I build a little hypertext wrapper which replaces divs with ExperimentalLayout.Div This way you get an intuitive html interface. The only downside is that only Divs are supported so far, but especially when using Markdown, the table tags would be super useful as well. |
Hello,
I would like to use the ExperimentalLayout feature, but am stuck at how to force everything into Pluto's standard cell width.
While at least the plot is responsive (I can test it by making the window width smaller and see it getting smaller and smaller) the combined hbox does put the plot in full cell-width next to the UI elements.
This example does not have the scrollbar, but it also shows that the resizing does not work. If I am decreasing the overall browser width, finall the markdown ui element does disappear completely.
Every help is highly appreciated.
The text was updated successfully, but these errors were encountered: