Replace core.Utils.isDefined for $defined.
This commit is contained in:
@@ -25,7 +25,7 @@ mindplot.commands.AddTopicCommand = new Class(
|
||||
this._model = model;
|
||||
this._parentId = parentTopicId;
|
||||
this._id = mindplot.Command._nextUUID();
|
||||
this._animated = core.Utils.isDefined(animated)?animated:false;
|
||||
this._animated = $defined(animated)?animated:false;
|
||||
},
|
||||
execute: function(commandContext)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ mindplot.commands.AddTopicCommand = new Class(
|
||||
var topic = commandContext.createTopic(this._model, !this._animated);
|
||||
|
||||
// Connect to topic ...
|
||||
if (core.Utils.isDefined(this._parentId))
|
||||
if ($defined(this._parentId))
|
||||
{
|
||||
var parentTopic = commandContext.findTopics(this._parentId)[0];
|
||||
commandContext.connect(topic, parentTopic, !this._animated);
|
||||
|
@@ -47,7 +47,7 @@ mindplot.commands.DragTopicCommand = new Class(
|
||||
// }
|
||||
|
||||
// Disconnect topic ..
|
||||
if (core.Utils.isDefined(origParentTopic))
|
||||
if ($defined(origParentTopic))
|
||||
{
|
||||
commandContext.disconnect(topic);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ mindplot.commands.DragTopicCommand = new Class(
|
||||
this._position = origPosition;
|
||||
|
||||
// Finally, connect topic ...
|
||||
if (core.Utils.isDefined(this._parentId))
|
||||
if ($defined(this._parentId))
|
||||
{
|
||||
var parentTopic = commandContext.findTopics([this._parentId])[0];
|
||||
commandContext.connect(topic, parentTopic);
|
||||
@@ -78,7 +78,7 @@ mindplot.commands.DragTopicCommand = new Class(
|
||||
|
||||
// Backup old parent id ...
|
||||
this._parentId = null;
|
||||
if (core.Utils.isDefined(origParentTopic))
|
||||
if ($defined(origParentTopic))
|
||||
{
|
||||
this._parentId = origParentTopic.getId();
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ mindplot.commands.MoveControlPointCommand = new Class(
|
||||
var model = line.getModel();
|
||||
switch (this._point){
|
||||
case 0:
|
||||
if(core.Utils.isDefined(this._oldControlPoint)){
|
||||
if($defined(this._oldControlPoint)){
|
||||
line.setFrom(this._originalEndPoint.x, this._originalEndPoint.y);
|
||||
model.setSrcCtrlPoint(this._oldControlPoint.clone());
|
||||
line.setSrcControlPoint(this._oldControlPoint.clone());
|
||||
@@ -78,7 +78,7 @@ mindplot.commands.MoveControlPointCommand = new Class(
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if(core.Utils.isDefined(this._oldControlPoint)){
|
||||
if($defined(this._oldControlPoint)){
|
||||
line.setTo(this._originalEndPoint.x, this._originalEndPoint.y);
|
||||
model.setDestCtrlPoint(this._oldControlPoint.clone());
|
||||
line.setDestControlPoint(this._oldControlPoint.clone());
|
||||
|
Reference in New Issue
Block a user