Drag pivot is not displayed when a node is clicked. Only when the first drag start.

This commit is contained in:
Paulo Veiga
2012-01-19 02:36:46 -03:00
parent c6fa09ec7d
commit db74c63943
6 changed files with 56 additions and 42 deletions

View File

@@ -133,29 +133,19 @@ 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);
}
// 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);
}
}
dragTopic.applyChanges(workspace);
});
return dragger;