diff --git a/src/gui/options.js b/src/gui/options.js index 4c1996f159f8250a0ff6888bfb3ee36067a16bc0..ac475a380e26045314bff1ba4f63e115772cf998 100644 --- a/src/gui/options.js +++ b/src/gui/options.js @@ -68,10 +68,14 @@ App.UI.OptionsGroup = (function() { } /** + * @param {string} [unit] * @returns {Option} */ - showTextBox() { + showTextBox(unit) { this.textbox = true; + if (unit) { + this.unit = unit; + } return this; } @@ -256,6 +260,9 @@ App.UI.OptionsGroup = (function() { textbox.classList.add("number"); } buttonGroup.append(textbox); + if (option.unit) { + buttonGroup.append(" ", option.unit); + } } if (option.comment) { const comment = document.createElement("span"); @@ -264,7 +271,6 @@ App.UI.OptionsGroup = (function() { buttonGroup.append(comment); } container.append(buttonGroup); - } return container;