Relationship lines can now be selected and deleted

This commit is contained in:
Pablo Luna
2010-12-22 19:34:24 -03:00
parent 67c4968aca
commit ae64037f3a
20 changed files with 400 additions and 207 deletions

View File

@@ -22,11 +22,11 @@ mindplot.commands.RemoveLinkFromTopicCommand = mindplot.Command.extend(
initialize: function(topicId)
{
core.assert(topicId, 'topicId can not be null');
this._topicId = topicId;
this._selectedObjectsIds = topicId;
},
execute: function(commandContext)
{
var topic = commandContext.findTopics(this._topicId)[0];
var topic = commandContext.findTopics(this._selectedObjectsIds)[0];
this._url = topic._link.getUrl();
var updated = function() {
topic.removeLink();
@@ -35,7 +35,7 @@ mindplot.commands.RemoveLinkFromTopicCommand = mindplot.Command.extend(
},
undoExecute: function(commandContext)
{
var topic = commandContext.findTopics(this._topicId)[0];
var topic = commandContext.findTopics(this._selectedObjectsIds)[0];
var updated = function() {
topic.addLink(this._url,commandContext._designer);
topic.updateNode();