Add Free position integration...

This commit is contained in:
Paulo Veiga
2012-01-18 01:26:39 -03:00
parent aa169f5f49
commit f0eb293211
11 changed files with 194 additions and 186 deletions

View File

@@ -63,6 +63,19 @@ mindplot.StandaloneActionDispatcher = new Class({
this.execute(command);
},
moveTopic: function(topicId, position) {
$assert($defined(topicId), "topicsId can not be null");
$assert($defined(position), "position can not be null");
var commandFunc = function(topic, value) {
var result = topic.getPosition();
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeMoveEvent, {node:topic.getModel(),position:value});
return result;
};
var command = new mindplot.commands.GenericFunctionCommand(commandFunc, topicId, position);
this._actionRunner.execute(command);
},
moveControlPoint: function(ctrlPoint, point) {
var command = new mindplot.commands.MoveControlPointCommand(ctrlPoint, point);
this.execute(command);