From c354e6c895ae5012871f0bda504f4ba42f18f78d Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 21 Jun 2023 23:04:12 -0400 Subject: more gen --- fractiform.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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; } -- cgit v1.2.3