Skip to content

Commit d04da09

Browse files
committed
Root name can be modified
1 parent ce5c297 commit d04da09

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/nodes/parsed_model_part.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ class ParsedModelPart {
44
this.input_manager.type = 'file';
55
this.input_manager.addEventListener('change', this.onSelection.bind(this));
66

7+
this.mp_name = this.addWidget("text","Name", "", function(v){}, {} );
78
this.mp_select = this.addWidget("button", "Load Mdpa", "", function (value, widget, node) {
89
node.input_manager.click();
910
});
@@ -18,7 +19,7 @@ class ParsedModelPart {
1819

1920
onExecute() {
2021
for (let i = 0; i < this.outputs.length; ++i) {
21-
this.setOutputData(i, this.outputs[i].name);
22+
this.setOutputData(i, this.mp_name.value+this.outputs[i].name);
2223
}
2324
}
2425

@@ -47,7 +48,8 @@ class ParsedModelPart {
4748
this.properties["submodelpart_list"] = [];
4849

4950
// Obtain the name of the ModelPart to get complete routes
50-
let sub_mdpa_namepath = file.name.slice(0, -5);
51+
let sub_mdpa_namepath = ""
52+
this.mp_name.value = file.name.slice(0, -5);
5153

5254
// Obtain the Submodelparts
5355
this.addOutput(sub_mdpa_namepath, "string");

0 commit comments

Comments
 (0)