File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 3
3
/** @jsx React.DOM */
4
4
var React = require ( 'react/addons' ) ;
5
5
var emptyFunction = require ( 'react/lib/emptyFunction' ) ;
6
+ var CX = React . addons . classSet ;
6
7
7
8
function createUIEvent ( draggable ) {
8
9
return {
@@ -445,12 +446,16 @@ module.exports = React.createClass({
445
446
if ( this . state . dragging && ! isNaN ( this . props . zIndex ) ) {
446
447
style . zIndex = this . props . zIndex ;
447
448
}
448
-
449
+
450
+ var className = CX ( {
451
+ 'react-draggable' : true ,
452
+ 'react-draggable-dragging' : this . state . dragging
453
+ } ) ;
449
454
// Reuse the child provided
450
455
// This makes it flexible to use whatever element is wanted (div, ul, etc)
451
456
return React . addons . cloneWithProps ( React . Children . only ( this . props . children ) , {
452
457
style : style ,
453
- className : 'react-draggable' ,
458
+ className : className ,
454
459
455
460
onMouseDown : this . handleDragStart ,
456
461
onTouchStart : function ( ev ) {
You can’t perform that action at this time.
0 commit comments