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

Distribute drags over more than just panels directly beside resizers #1 #184

Closed
wants to merge 7 commits into from

Conversation

hipstersmoothie
Copy link
Contributor

@hipstersmoothie hipstersmoothie commented Aug 17, 2023

Took me a few tries and the code could probably be improved but this fixes #181

The way it work now is:

  • when we apply the new sizes in the direction the delta dictates instead of applying it to just that panel the code now checks if that panel is maxed. If it is we continue on to the next panel. If no panels have room to grow resizing stops
  • the same logic is applied to panels in the opposite direction of the delta. we check if the panels in that direction are at their min and move on to the next panel. If there are no more panels that can shrink resizing stops.

@vercel
Copy link

vercel bot commented Aug 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-resizable-panels ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 17, 2023 7:22am

@bvaughn
Copy link
Owner

bvaughn commented Aug 17, 2023

Hey thanks for sharing this idea 👍🏼

It doesn't look like this was built on top of #182, so it's probably not something I would consider landing as is. (I plan to ship that branch once I have a bit more time to finish it– probably after my on call shift ends this week.) Still probably worth having a proof of concept like this to look at and consider though! :)

@hipstersmoothie
Copy link
Contributor Author

I'll update it tonight, doesn't look too different 😄

@bvaughn
Copy link
Owner

bvaughn commented Nov 12, 2023

#182 has been merged. Please rebase this if you want me to take a look.

@bvaughn
Copy link
Owner

bvaughn commented Nov 12, 2023

I'm tidying up old issues and PRs after merging the long-running refactor. I'm going to close this as it's conflicted and stale. Please re-open it after rebasing if you'd like me to review it!

@bvaughn bvaughn closed this Nov 12, 2023
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

Successfully merging this pull request may close these issues.

Resizing stop working if panel to immediate right hit's it's max
2 participants