diff options
author | pommicket <pommicket@gmail.com> | 2023-06-21 23:04:12 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-06-21 23:04:12 -0400 |
commit | c354e6c895ae5012871f0bda504f4ba42f18f78d (patch) | |
tree | a9b49faa6cfa6770ed9f8ca934df2c98ba9c59e9 | |
parent | e1c530032a27e4c3d81f071ac33575cba9b3a4fe (diff) |
more gen
-rw-r--r-- | fractiform.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fractiform.js b/fractiform.js index af0cdd1..4817d84 100644 --- a/fractiform.js +++ b/fractiform.js @@ -370,6 +370,7 @@ function add_widget(func) { root.appendChild(title); } + // inputs for (let input of info.inputs) { let container = document.createElement('div'); container.classList.add('in'); @@ -385,6 +386,21 @@ function add_widget(func) { root.appendChild(container); } + { // outputs + let container = document.createElement('div'); + container.classList.add('outs'); + info.outputs.forEach(function (output, i) { + if (i > 0) { + container.appendChild(document.createTextNode(', ')); + } + let span = document.createElement('span'); + span.classList.add('out'); + span.appendChild(document.createTextNode(output.name)); + container.appendChild(span); + }); + root.appendChild(container); + } + ui_div.appendChild(root); return true; } |