From 654caea96ed41b5860da9af8a7fa93b19a4c658b Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 7 Nov 2016 08:44:19 +0100 Subject: [PATCH] launcher: display options descriptions for booleans too (use empty instead of false to let the placeholder appear) --- CHANGELOG.md | 2 ++ app/main/launcher/launcher.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a77e365..ad243401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - bug fixes - `-g / --no-gui` didn't prevent the launcher from spanwing - `-e / --examples` not correctly parsed +- main + - launcher displays options descriptions for booleans too - widgets - added generic `value` option for setting a widget's initial value (does not sync linked widget nor send osc message) - **text** widget's `defaultText` replaced with `value` diff --git a/app/main/launcher/launcher.js b/app/main/launcher/launcher.js index 32a261f5..f0d421f6 100644 --- a/app/main/launcher/launcher.js +++ b/app/main/launcher/launcher.js @@ -34,7 +34,7 @@ $(document).ready(()=>{ if (option.type=='boolean') { - input = $(``) + input = $(``) input.click(function(e){ e.preventDefault() input.val(!eval(input.val())).trigger('change') @@ -61,7 +61,7 @@ $(document).ready(()=>{ input.on('change',function(e){ var v = $(this).val() if (option.type == 'boolean') { - v = v == 'true' + v = v == 'true' ? true : '' input.val(v) } else if (v && option.type == 'array'){ v = v.trim().split(' ')