mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
Minor fix.
This commit is contained in:
parent
e70f2726a3
commit
f44e616a4b
@ -150,17 +150,20 @@ mindplot.commands.DeleteCommand = new Class({
|
|||||||
}, this);
|
}, this);
|
||||||
result.append(rels.flatten());
|
result.append(rels.flatten());
|
||||||
|
|
||||||
|
if (result.length > 0) {
|
||||||
// Filter for unique ...
|
// Filter for unique ...
|
||||||
result = result.sort(function (a, b) {
|
result = result.sort(function (a, b) {
|
||||||
return a.getModel().getId() - b.getModel().getId();
|
return a.getModel().getId() - b.getModel().getId();
|
||||||
});
|
});
|
||||||
var ret = [result[0]];
|
var ret = [result[0]];
|
||||||
for (var i = 1; i < result.length; i++) { // start loop at 1 as element 0 can never be a duplicate
|
for (var i = 1; i < result.length; i++) { // start loop at 1 as element 0 can never be a duplicate
|
||||||
if (result[i - 1] !== result[i] && result[i] != null) {
|
if (result[i - 1] !== result[i]) {
|
||||||
ret.push(result[i]);
|
ret.push(result[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
result = ret;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user