react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

Draggable component position problem

Open zhangwei900808 opened this issue 6 years ago • 1 comments
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>

image

zhangwei900808 avatar Sep 24 '19 02:09 zhangwei900808