File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 1212 margin : 0 50px ;
1313 }
1414
15+ .react-draggable , .cursor {
16+ cursor : move;
17+ }
18+ .no-cursor {
19+ cursor : auto;
20+ }
21+ .cursor-y {
22+ cursor : ns-resize;
23+ }
24+ .cursor-x {
25+ cursor : ew-resize;
26+ }
27+
1528 .react-draggable strong {
1629 background : # ddd ;
1730 border : 1px solid # 999 ;
3649</ head >
3750< body >
3851< script src ="../build/bundle.js "> </ script >
52+ </ body >
53+ </ html >
Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ var App = React.createClass({
3434 < div className = "box" > I can be dragged anywhere</ div >
3535 </ Draggable >
3636 < Draggable axis = "x" zIndex = { 100 } >
37- < div className = "box" > I can only be dragged horizonally</ div >
37+ < div className = "box cursor-x " > I can only be dragged horizonally</ div >
3838 </ Draggable >
3939 < Draggable axis = "y" zIndex = { 100 } >
40- < div className = "box" > I can only be dragged vertically</ div >
40+ < div className = "box cursor-y " > I can only be dragged vertically</ div >
4141 </ Draggable >
4242 < Draggable onDrag = { this . handleDrag } zIndex = { 100 } >
4343 < div className = "box" >
@@ -46,14 +46,14 @@ var App = React.createClass({
4646 </ div >
4747 </ Draggable >
4848 < Draggable handle = "strong" zIndex = { 100 } >
49- < div className = "box" >
50- < strong > Drag here</ strong >
49+ < div className = "box no-cursor " >
50+ < strong className = "cursor" > Drag here</ strong >
5151 < div > You must click my handle to drag me</ div >
5252 </ div >
5353 </ Draggable >
5454 < Draggable cancel = "strong" zIndex = { 100 } >
5555 < div className = "box" >
56- < strong > Can't drag here</ strong >
56+ < strong className = "no-cursor" > Can't drag here</ strong >
5757 < div > Dragging here works</ div >
5858 </ div >
5959 </ Draggable >
You can’t perform that action at this time.
0 commit comments