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

Cannot get window size while resizing #13

Open
faizan170 opened this issue Feb 22, 2022 · 3 comments
Open

Cannot get window size while resizing #13

faizan170 opened this issue Feb 22, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@faizan170
Copy link

I am using this library in react with canvas. I need to update canvas width when resizing windows using this package.
But it provides on resize start and resize finish methods. Is there any way to get data while resizing window?

@mlejva
Copy link
Contributor

mlejva commented Feb 22, 2022

Hey @faizan170, this functionality isn't supported. It's on purpose so the resizing can stay fast and responsive and without any additional JS calls. The idea was that CSS should handle the resizing so there wouldn't be a need for any custom JS manipulation.

I haven't worked with canvas but I guess the CSS route isn't possible there?

@mlejva mlejva added the enhancement New feature or request label Feb 22, 2022
@faizan170
Copy link
Author

Yes, we need to method to rerender points on canvas while resizing. So for this we need to make it real time to use that method. I tried some other options like checking width of modified elments while resizing but splitter start causing issues.

@mlejva
Copy link
Contributor

mlejva commented Feb 24, 2022

I see. I don't really have a working solution or a hack right now, unfortunately. I need to think about this once I have some allocated time for this project.
I can't right away tell you whether it would be a worthy trade off given the goal of Splitter being as little JS powered as possible.

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

No branches or pull requests

2 participants