mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-26 07:44:56 +01:00
Free positioning working ...
This commit is contained in:
parent
f0eb293211
commit
2e49219fb9
@ -46,7 +46,7 @@ mindplot.DragTopic = new Class({
|
||||
// Update visual position.
|
||||
this._elem2d.setPosition(cx, cy);
|
||||
|
||||
if (this.isConnected()) {
|
||||
if (this.isConnected() && !this.isFreeLayoutOn()) {
|
||||
var parent = this.getConnectedToTopic();
|
||||
var predict = designer._eventBussDispatcher._layoutManager.predict(parent.getId(), this.getPosition());
|
||||
if (this._order != predict.order) {
|
||||
@ -59,7 +59,12 @@ mindplot.DragTopic = new Class({
|
||||
},
|
||||
|
||||
updateFreeLayout: function(event) {
|
||||
this._isFreeLayoutEnabled = (event.meta && Browser.Platform.mac) || (event.control && !Browser.Platform.mac);
|
||||
var isFreeEnabled = (event.meta && Browser.Platform.mac) || (event.control && !Browser.Platform.mac);
|
||||
if (this.isFreeLayoutOn() != isFreeEnabled) {
|
||||
var dragPivot = this._getDragPivot();
|
||||
dragPivot.setVisibility(!isFreeEnabled);
|
||||
this._isFreeLayoutEnabled = isFreeEnabled;
|
||||
}
|
||||
},
|
||||
|
||||
getInnerShape : function() {
|
||||
|
@ -74,8 +74,9 @@ mindplot.StandaloneActionDispatcher = new Class({
|
||||
};
|
||||
|
||||
var command = new mindplot.commands.GenericFunctionCommand(commandFunc, topicId, position);
|
||||
this._actionRunner.execute(command);
|
||||
this.execute(command);
|
||||
},
|
||||
|
||||
moveControlPoint: function(ctrlPoint, point) {
|
||||
var command = new mindplot.commands.MoveControlPointCommand(ctrlPoint, point);
|
||||
this.execute(command);
|
||||
@ -104,7 +105,7 @@ mindplot.StandaloneActionDispatcher = new Class({
|
||||
return result;
|
||||
};
|
||||
var command = new mindplot.commands.GenericFunctionCommand(commandFunc, topicsIds);
|
||||
this._actionRunner.execute(command);
|
||||
this.execute(command);
|
||||
|
||||
},
|
||||
|
||||
@ -118,7 +119,7 @@ mindplot.StandaloneActionDispatcher = new Class({
|
||||
};
|
||||
|
||||
var command = new mindplot.commands.GenericFunctionCommand(commandFunc, topicsIds, text);
|
||||
this._actionRunner.execute(command);
|
||||
this.execute(command);
|
||||
},
|
||||
|
||||
changeFontFamilyToTopic: function(topicIds, fontFamily) {
|
||||
|
@ -65,7 +65,7 @@ mindplot.layout.EventBusDispatcher = new Class({
|
||||
},
|
||||
|
||||
_nodeAdded: function(node) {
|
||||
// Centra topic must not be added twice ...
|
||||
// Central topic must not be added twice ...
|
||||
if (node.getId() != 0) {
|
||||
this._layoutManager.addNode(node.getId(), {width:10,height:10}, node.getPosition());
|
||||
this._layoutManager.updateShrinkState(node.getId(), node.areChildrenShrunken());
|
||||
|
Loading…
Reference in New Issue
Block a user