react-draggable
react-draggable copied to clipboard
Draggable component position problem
trafficstars
I set two draggable component in my div and I set position but they don't directly use my position How can I fix it?
<Draggable handle=".handle" bounds="parent" defaultPosition={{ x: 100, y: 100 }} position={null} grid={[25, 25]} scale={0.5}>
<div className="handle" style={{ width: 400, height: 300, background: "red" }}>
Drag from here
</div>
</Draggable>
<Draggable handle=".handle" bounds="parent" defaultPosition={{ x: 0, y: 0 }} position={null} grid={[25, 25]} scale={0.5}>
<div className="handle" style={{ width: 400, height: 300, background: "green" }}>
Drag from here
</div>
</Draggable>
