Integrated Giulio's comments in previous commit
This commit is contained in:
parent
4a869380b0
commit
ee163ba2e9
File diff suppressed because one or more lines are too long
@ -63,7 +63,7 @@ Clipperz.PM.UI.Components.Cards.EditClass = React.createClass({
|
|||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
fieldMoveStart: function(aFieldReference, aFieldPosition, touchStyle) {
|
fieldMoveStart: function(aFieldReference, aFieldPosition, touchStyle) {
|
||||||
MochiKit.Async.callLater(0.1, MochiKit.Base.bind(this.setState, this, {
|
MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'setState', {
|
||||||
'draggedFieldReference': aFieldReference,
|
'draggedFieldReference': aFieldReference,
|
||||||
'fromFieldPosition': aFieldPosition,
|
'fromFieldPosition': aFieldPosition,
|
||||||
'touchStyle': touchStyle,
|
'touchStyle': touchStyle,
|
||||||
@ -125,17 +125,14 @@ console.log("DROP"); //, anEvent);
|
|||||||
//console.log("CANCELLED FIELD MOVE");
|
//console.log("CANCELLED FIELD MOVE");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delayed because
|
// Delayed because a quick touch would prevent the state to update correctly otherwise (don't know why)
|
||||||
// - A quick touch would prevent the state to update correctly otherwise (don't know why)
|
MochiKit.Async.callLater(0.1, MochiKit.Base.method(this, 'setState', {
|
||||||
// - It takes a little time to actually move the field
|
|
||||||
MochiKit.Async.callLater(0.1, MochiKit.Base.bind(function () {
|
|
||||||
this.setState({
|
|
||||||
'draggedFieldReference': null,
|
'draggedFieldReference': null,
|
||||||
'fromFieldPosition': -1,
|
'fromFieldPosition': -1,
|
||||||
'toFieldPosition': -1,
|
'toFieldPosition': -1,
|
||||||
'dropPosition': -1
|
'dropPosition': -1
|
||||||
});
|
})
|
||||||
}, this));
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
//............................................................................
|
//............................................................................
|
||||||
|
Loading…
Reference in New Issue
Block a user