Fix commands calling super class constructor.
This commit is contained in:
@@ -24,6 +24,7 @@ mindplot.commands.AddFeatureToTopicCommand = new Class({
|
||||
$assert(featureType, 'featureType can not be null');
|
||||
$assert(attributes, 'attributes can not be null');
|
||||
|
||||
this.parent();
|
||||
this._topicId = topicId;
|
||||
this._featureType = featureType;
|
||||
this._attributes = attributes;
|
||||
|
@@ -19,8 +19,9 @@ mindplot.commands.AddRelationshipCommand = new Class({
|
||||
Extends:mindplot.Command,
|
||||
initialize: function(model) {
|
||||
$assert(model, 'Relationship model can not be null');
|
||||
|
||||
this.parent();
|
||||
this._model = model;
|
||||
this._id = mindplot.Command._nextUUID();
|
||||
},
|
||||
execute: function(commandContext) {
|
||||
var relationship = commandContext.createRelationship(this._model);
|
||||
|
@@ -21,6 +21,8 @@ mindplot.commands.AddTopicCommand = new Class(
|
||||
Extends:mindplot.Command,
|
||||
initialize: function(model, parentTopicId, animated) {
|
||||
$assert(model, 'Model can not be null');
|
||||
|
||||
this.parent();
|
||||
this._model = model;
|
||||
this._parentId = parentTopicId;
|
||||
this._id = mindplot.Command._nextUUID();
|
||||
|
@@ -23,6 +23,7 @@ mindplot.commands.ChangeFeatureToTopicCommand = new Class({
|
||||
$assert($defined(featureId), 'featureId can not be null');
|
||||
$assert($defined(attributes), 'attributes can not be null');
|
||||
|
||||
this.parent();
|
||||
this._topicId = topicId;
|
||||
this._featureId = featureId;
|
||||
this._attributes = attributes;
|
||||
|
@@ -21,6 +21,7 @@ mindplot.commands.DeleteCommand = new Class({
|
||||
initialize: function(topicIds, relIds) {
|
||||
$assert($defined(topicIds), 'topicIds can not be null');
|
||||
|
||||
this.parent();
|
||||
this._relIds = relIds;
|
||||
this._topicIds = topicIds;
|
||||
this._deletedTopicModels = [];
|
||||
|
@@ -25,6 +25,7 @@ mindplot.commands.DragTopicCommand = new Class({
|
||||
if ($defined(parentTopic))
|
||||
this._parentId = parentTopic.getId();
|
||||
|
||||
this.parent();
|
||||
this._position = position;
|
||||
this._order = order;
|
||||
this._id = mindplot.Command._nextUUID();
|
||||
@@ -58,7 +59,7 @@ mindplot.commands.DragTopicCommand = new Class({
|
||||
// Set position ...
|
||||
topic.setPosition(this._position);
|
||||
} else {
|
||||
$assert("Illegal commnad state exception.");
|
||||
$assert("Illegal command state exception.");
|
||||
}
|
||||
|
||||
// Finally, connect topic ...
|
||||
|
@@ -22,11 +22,11 @@ mindplot.commands.GenericFunctionCommand = new Class({
|
||||
$assert(commandFunc, "commandFunc must be defined");
|
||||
$assert($defined(topicsIds), "topicsIds must be defined");
|
||||
|
||||
this.parent();
|
||||
this._value = value;
|
||||
this._topicsIds = topicsIds;
|
||||
this._commandFunc = commandFunc;
|
||||
this._oldValues = [];
|
||||
this._id = mindplot.Command._nextUUID();
|
||||
},
|
||||
|
||||
execute: function(commandContext) {
|
||||
|
@@ -21,6 +21,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
|
||||
$assert(ctrlPointController, 'line can not be null');
|
||||
$assert($defined(point), 'point can not be null');
|
||||
|
||||
this.parent();
|
||||
this._ctrlPointControler = ctrlPointController;
|
||||
this._line = ctrlPointController._line;
|
||||
this._controlPoint = this._ctrlPointControler.getControlPoint(point).clone();
|
||||
@@ -36,7 +37,6 @@ mindplot.commands.MoveControlPointCommand = new Class({
|
||||
this._endPoint = this._line.getLine().getTo().clone();
|
||||
break;
|
||||
}
|
||||
this._id = mindplot.Command._nextUUID();
|
||||
this._point = point;
|
||||
},
|
||||
|
||||
|
@@ -22,6 +22,7 @@ mindplot.commands.RemoveFeatureFromTopicCommand = new Class({
|
||||
$assert($defined(topicId), 'topicId can not be null');
|
||||
$assert(featureId, 'iconModel can not be null');
|
||||
|
||||
this.parent();
|
||||
this._topicId = topicId;
|
||||
this._featureId = featureId;
|
||||
this._oldFeature = null;
|
||||
|
Reference in New Issue
Block a user