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

Is there a way to get the initial size from the rendered DOM ? #20

Open
julienw opened this issue Jun 20, 2018 · 6 comments
Open

Is there a way to get the initial size from the rendered DOM ? #20

julienw opened this issue Jun 20, 2018 · 6 comments

Comments

@julienw
Copy link

julienw commented Jun 20, 2018

Hi,

I have a layout where I'd like to initially position the splitter using flex (with a flex-basis set to auto to make it dependant on its content). But currently it's not possible as SplitterLayout forcibly sets a calculated or provided height (or width), unless I missed something.

@julienw
Copy link
Author

julienw commented Jun 20, 2018

Maybe a way could be to accept an initialSize without appending the unit, so that we could use auto or even a calc-based value.

@zesik
Copy link
Owner

zesik commented Jun 21, 2018

Hi,

Auto initial size is not supported now. And without units, size values won't be valid.
I'll check whether this is possible when I get some time.

@julienw
Copy link
Author

julienw commented Jun 21, 2018

And without units, size values won't be valid.

Yes, I think about it only for the initial size, not for subsequent sizes (after manually resizing) that would be in px.

@zesik
Copy link
Owner

zesik commented Jun 21, 2018

Yes, I think about it only for the initial size, not for subsequent sizes (after manually resizing) that would be in px.

I prefer not setting invalid values at any time. Maybe it's possible to ignore initial values at all for such cases. Will do some tests about it.

@julienw
Copy link
Author

julienw commented Jun 21, 2018

I thought we could provide an initial size that could be a full string, like calc(100vh - 120px) or auto. It's not invalid in this case.

But because the code forcefully appends px or % to the size, it's not possible.

@zesik
Copy link
Owner

zesik commented Jun 25, 2018

I thought we could provide an initial size that could be a full string, like calc(100vh - 120px) or auto. It's not invalid in this case.

This might need quite a few changes due to how the splitter is currently is implemented.
I'll consider whether it's our best option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants