Commit dffc0887 authored by techird's avatar techird

fix drag issue

parent 7cba351c
...@@ -123,6 +123,9 @@ var TreeDragger = kity.createClass('TreeDragger', { ...@@ -123,6 +123,9 @@ var TreeDragger = kity.createClass('TreeDragger', {
if (!this._dragMode) { if (!this._dragMode) {
return; return;
} }
this._fadeDragSources(1);
if (this._dropSucceedTarget) { if (this._dropSucceedTarget) {
this._dragSources.forEach(function(source) { this._dragSources.forEach(function(source) {
...@@ -195,8 +198,11 @@ var TreeDragger = kity.createClass('TreeDragger', { ...@@ -195,8 +198,11 @@ var TreeDragger = kity.createClass('TreeDragger', {
this._dragSources.forEach(function(source) { this._dragSources.forEach(function(source) {
source.getRenderContainer().fxOpacity(opacity, 200); source.getRenderContainer().fxOpacity(opacity, 200);
source.traverse(function(node) { source.traverse(function(node) {
if (opacity < 1) minder.detachNode(node); if (opacity < 1) {
else minder.attachNode(node); minder.detachNode(node);
} else {
minder.attachNode(node);
}
}, true); }, true);
if (opacity < 1) { if (opacity < 1) {
minder.removeConnect(source); minder.removeConnect(source);
...@@ -260,7 +266,6 @@ var TreeDragger = kity.createClass('TreeDragger', { ...@@ -260,7 +266,6 @@ var TreeDragger = kity.createClass('TreeDragger', {
}, },
_leaveDragMode: function() { _leaveDragMode: function() {
this._fadeDragSources(1);
this._dragMode = false; this._dragMode = false;
this._dropSucceedTarget = null; this._dropSucceedTarget = null;
this._orderSucceedHint = null; this._orderSucceedHint = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment