Refactor designer moving methods to a designer model.

This commit is contained in:
Paulo Veiga
2011-08-24 23:41:39 -03:00
parent f01a01b72d
commit 046789bb6a
21 changed files with 276 additions and 229 deletions

View File

@@ -21,11 +21,11 @@ mindplot.commands.RemoveNoteFromTopicCommand = new Class({
initialize: function(topicId)
{
$assert(topicId, 'topicId can not be null');
this._selectedObjectsIds = topicId;
this._objectsIds = topicId;
},
execute: function(commandContext)
{
var topic = commandContext.findTopics(this._selectedObjectsIds)[0];
var topic = commandContext.findTopics(this._objectsIds)[0];
this._text = topic._note.getText();
var updated = function() {
topic.removeNote();
@@ -34,7 +34,7 @@ mindplot.commands.RemoveNoteFromTopicCommand = new Class({
},
undoExecute: function(commandContext)
{
var topic = commandContext.findTopics(this._selectedObjectsIds)[0];
var topic = commandContext.findTopics(this._objectsIds)[0];
var updated = function() {
topic.addNote(this._text,commandContext._designer);
topic.updateNode();