- Fix actions over the central topic.

This commit is contained in:
Paulo Veiga 2011-11-30 00:59:36 -03:00
parent dfc3bbdbe6
commit 4d3baac09d
3 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@
mindplot.commands.ChangeLinkToTopicCommand = new Class({
Extends:mindplot.Command,
initialize: function(topicId, url) {
$assert(topicId, 'topicId can not be null');
$assert($defined(topicId), 'topicId can not be null');
this._topicsIds = topicId;
this._url = url;
this._id = mindplot.Command._nextUUID();

View File

@ -19,14 +19,14 @@
mindplot.commands.ChangeNoteToTopicCommand = new Class({
Extends:mindplot.Command,
initialize: function(topicId, text) {
$assert(topicId, 'topicId can not be null');
$assert($defined(topicId), 'topicId can not be null');
this._topicsIds = topicId;
this._text = text;
this._oldtext = null;
this._id = mindplot.Command._nextUUID();
},
execute: function(commandContext) {
execute: function(commandContext) {
var topic = commandContext.findTopics(this._topicsIds)[0];
if (topic.hasNote()) {
var model = topic.getModel();

View File

@ -20,7 +20,7 @@ mindplot.commands.GenericFunctionCommand = new Class({
Extends:mindplot.Command,
initialize: function(commandFunc, topicsIds,value) {
$assert(commandFunc, "commandFunc must be defined");
$assert(topicsIds, "topicsIds must be defined");
$assert($defined(topicsIds), "topicsIds must be defined");
this._value = value;
this._topicsIds = topicsIds;