mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 03:43:48 +01:00
- Fix orphan relationships.
This commit is contained in:
parent
be4d7d1c91
commit
8320ae0abf
@ -134,15 +134,13 @@ mindplot.commands.DeleteCommand = new Class({
|
||||
|
||||
_collectInDepthRelationships:function (topic) {
|
||||
var result = [];
|
||||
result.append(topic.getRelationships());
|
||||
|
||||
var children = topic.getChildren();
|
||||
if (children.length > 0) {
|
||||
var rels = children.map(function (topic) {
|
||||
return this._collectInDepthRelationships(topic);
|
||||
}, this);
|
||||
result.append(rels.flatten());
|
||||
} else {
|
||||
result.append(topic.getRelationships());
|
||||
}
|
||||
var rels = children.map(function (topic) {
|
||||
return this._collectInDepthRelationships(topic);
|
||||
}, this);
|
||||
result.append(rels.flatten());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user