This repository has been archived by the owner on Nov 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 168
Singleton layout that positions its children #340
Comments
jasongrout
changed the title
Singleton layout
Singleton layout that positions its children
May 20, 2018
jasongrout
added a commit
to jasongrout/jupyterlab
that referenced
this issue
May 20, 2018
The BoxLayout positions its children, so size information propagates up and down. See phosphorjs/phosphor#340 for more details. In particular, I was seeing issues with using SingletonLayout in the editor, where the codemirror editor was not understanding it was inside a small window and needed to have scrollbars.
Can you use a |
Thanks. That's enough better than BoxLayout (e.g., I don't have to set stretch factors, etc.) that it works well for my usecase: jupyterlab/jupyterlab@4efcad2 |
Glad that worked for your case. I'm going to re-open this though. I think it would be nice to have an "absolute mode" or something for |
Thanks, that's great too. That would convey more clearly my intent instead of using a stacked layout with one child. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently the SingletonLayout provides a nice simplification of PanelLayout (i.e., a single CSS-positioned child). It would be great if we had a similar singleton layout that simplified BoxLayout (i.e., that explicitly positioned its single child, so size information propagated up and down through the layout).
For now, I'll use a Layout attribute which internally I know is a BoxLayout with one child.
The text was updated successfully, but these errors were encountered: