Minor fixes.

This commit is contained in:
Paulo Veiga
2011-10-09 18:14:28 -03:00
parent a10001dd80
commit 707e1864ef
3 changed files with 13 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
Extends:mindplot.Command,
initialize: function(ctrlPointController, point) {
$assert(ctrlPointController, 'line can not be null');
$assert(point, 'point can not be null');
$assert($defined(point), 'point can not be null');
this._ctrlPointControler = ctrlPointController;
this._line = ctrlPointController._line;
@@ -39,6 +39,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
this._id = mindplot.Command._nextUUID();
this._point = point;
},
execute: function(commandContext) {
var model = this._line.getModel();
switch (this._point) {
@@ -62,6 +63,7 @@ mindplot.commands.MoveControlPointCommand = new Class({
}
this._line.getLine().updateLine(this._point);
},
undoExecute: function(commandContext) {
var line = this._line;
var model = line.getModel();