phuocng/react-drag-drop

Multiple drag and resize in constrain

Opened this issue · 1 comments

Hi, first of all thank you for your components, they helped me a lot with my own project.

I'm working on a multiple drag and resize in a constrain, you can have a look here.

I was wondering if you want to work together or if you have any idea on how to make it working properly.

My problem is that the second item that I upload it goes below the first one so the constrain of the second one is offset by the height of the first. You can even see that when you resize any item it moves the other one too.

I was thinking 2 solutions

  1. I do a manual offset only when component is loaded and I set the offset based on prev node height, but I don't think is the right solution as I don't see how it would "separate" the items. I'm still trying to figure it out though

  2. When I load the files I put them all at position 0:0 but I haven't tried this yet

update: I think I fixed it by removing position: relative from .resizable