Reverted unstable changes from db74c63943

This commit is contained in:
Gonzalo Bellver
2012-01-20 11:07:44 -03:00
parent e98d7f8147
commit c7dcf9faf8
5 changed files with 41 additions and 55 deletions

View File

@@ -133,19 +133,29 @@ mindplot.Designer = new Class({
if (!dragTopic.isFreeLayoutOn(event)) {
// The node is being drag. Is the connection still valid ?
dragConnector.checkConnection(dragTopic);
if (!dragTopic.isVisible() && dragTopic.isConnected()) {
dragTopic.setVisibility(true);
}
}
});
dragger.addEvent('enddragging', function(event, dragTopic) {
// Enable all mouse events.
for (var i = 0; i < topics.length; i++) {
topics[i].setMouseEventsEnabled(true);
}
dragTopic.applyChanges(workspace);
// Topic must be positioned in the real board postion.
if (dragTopic._isInTheWorkspace) {
var draggedTopic = dragTopic.getDraggedTopic();
// Hide topic during draw ...
draggedTopic.setBranchVisibility(false);
var parentNode = draggedTopic.getParent();
dragTopic.applyChanges(workspace);
// Make all node visible ...
draggedTopic.setVisibility(true);
if (parentNode != null) {
parentNode.setBranchVisibility(true);
}
}
});
return dragger;