Commit 89fb80d7 authored by techird's avatar techird

hide subtree on drag

parent df8e587c
......@@ -34,6 +34,7 @@ kity.extendClass(Minder, {
}
this._connectContainer.addShape(connection);
this.updateConnect(node);
},
removeConnect: function(node) {
......
......@@ -181,8 +181,8 @@ var Minder = KityMinder.Minder = kity.createClass('KityMinder', {
lastStatus:this._status,
currentStatus:status
});
console.log(window.event.type, this._status, '->', status);
console.trace();
// console.log(window.event.type, this._status, '->', status);
// console.trace();
this._rollbackStatus = this._status;
this._status = status;
}
......
......@@ -216,6 +216,6 @@ kity.extendClass(MinderNode, {
},
getContentBox: function() {
//if (!this._contentBox) this.render();
return this.parent && this.parent.isCollapsed() ? new kity.Box() : this._contentBox;
return this.parent && this.parent.isCollapsed() ? new kity.Box() : (this._contentBox || new kity.Box());
}
});
\ No newline at end of file
......@@ -191,8 +191,13 @@ var TreeDragger = kity.createClass('TreeDragger', {
},
_fadeDragSources: function(opacity) {
var minder = this._minder;
this._dragSources.forEach(function(source) {
source.getRenderContainer().fxOpacity(opacity, 200);
source.traverse(function(node) {
if (opacity < 1) minder.detachNode(node);
else minder.attachNode(node);
}, true);
});
},
......
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