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

css flex is too slow for live resize #1

Open
milahu opened this issue Dec 15, 2020 · 2 comments
Open

css flex is too slow for live resize #1

milahu opened this issue Dec 15, 2020 · 2 comments

Comments

@milahu
Copy link
Owner

milahu commented Dec 15, 2020

to resize two of N cells in a flex layout, we must set the flex-size for all N cells
which is unnecessary (N-2 cells keep their size) and expensive (layout repaint?)

but we want to keep the flex layout
so on window resize, our layout keeps its proportions
(is this possible without flex?)

possible solution: use a "hybrid" approach.
on resize start, convert the flex layout to a non-flex layout = divs with fixed pixel sizes
on resize, change size only for 2 cells
after resize (or on mouseleave), convert back to flex layout

other solution: debounce the mousemove handler to a lower frame rate, like 10 FPS
so at least we waste less CPU time on resize

todo: how exactly does goldenlayout.js work?
its an older project, so probably they do not use css flex
good old html tables layout? display: inline-block? position: absolute? float?

@mhkeller
Copy link

Having a live resize would be really helpful!

@milahu
Copy link
Owner Author

milahu commented Feb 15, 2021

thx for remind ; )

maybe this component can be merged into

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