mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Remove filtering of nodes.
This commit is contained in:
parent
2c57631ce6
commit
69f7881e0e
@ -40,9 +40,8 @@ class TxtExporter extends Exporter {
|
|||||||
private traverseBranch(indent: string, prefix: string, branches: INodeModel[]) {
|
private traverseBranch(indent: string, prefix: string, branches: INodeModel[]) {
|
||||||
let result = '';
|
let result = '';
|
||||||
branches
|
branches
|
||||||
.filter((n) => n.getText() !== undefined)
|
|
||||||
.forEach((node, index) => {
|
.forEach((node, index) => {
|
||||||
result = `${result}${indent}${prefix}${index + 1} ${node.getText()}`;
|
result = `${result}${indent}${prefix}${index + 1} ${node.getText() !== undefined ? node.getText() : ''}`;
|
||||||
node.getFeatures().forEach((f) => {
|
node.getFeatures().forEach((f) => {
|
||||||
const type = f.getType();
|
const type = f.getType();
|
||||||
if (type === 'link') {
|
if (type === 'link') {
|
||||||
@ -54,9 +53,7 @@ class TxtExporter extends Exporter {
|
|||||||
});
|
});
|
||||||
result = `${result}\n`;
|
result = `${result}\n`;
|
||||||
|
|
||||||
if (node.getChildren().filter((n) => n.getText() !== undefined).length > 0) {
|
|
||||||
result += this.traverseBranch(`\t${indent}`, `${prefix}${index + 1}.`, node.getChildren());
|
result += this.traverseBranch(`\t${indent}`, `${prefix}${index + 1}.`, node.getChildren());
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user