-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Collision detection #746
Comments
No, the react-draggable library doesn't have built-in collision detection to prevent overlapping rectangles. However, you can achieve collision detection functionality using other methods. Here are two approaches:
This approach involves writing your React code to check for collisions between draggable elements:
Usage:
Several libraries offer collision detection functionalities that can be integrated with react-draggable. Here are a few options: -react-dnd: This popular library provides drag-and-drop functionalities, including collision detection and other advanced features. -react-grid-layout: This library helps manage draggable elements in a grid layout, ensuring they don't overlap. Hope this helps :) |
Hi!
Is there also a collision detection inside this library so that I cannot overlap rectangles when I drag them around?
Really cool library btw.
The text was updated successfully, but these errors were encountered: