Skip to content

Commit 1c6eb98

Browse files
committed
reuse JsonFormatterWidget
1 parent d68cb6f commit 1c6eb98

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

services/static-webserver/client/source/class/osparc/info/FunctionLarge.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,11 @@ qx.Class.define("osparc.info.FunctionLarge", {
6161
"Default Inputs": this.getFunction().getDefaultInputs(),
6262
"Outputs": this.getFunction().getOutputSchema()["schema_content"],
6363
};
64-
const divId = "function-info-viewer";
65-
const htmlEmbed = osparc.wrapper.JsonFormatter.getInstance().createContainer(divId);
66-
vBox.add(htmlEmbed, {
67-
flex: 1
68-
});
69-
vBox.addListener("appear", () => {
70-
osparc.wrapper.JsonFormatter.getInstance().setJson(info, divId);
71-
});
64+
const jsonViewer = new osparc.widget.JsonFormatterWidget();
65+
const scroll = new qx.ui.container.Scroll();
66+
scroll.add(jsonViewer, { flex: 1 });
67+
vBox.add(scroll, { flex: 1 });
68+
jsonViewer.setJson(info);
7269

7370
// Copy Id button
7471
const text = "Function Id";

0 commit comments

Comments
 (0)