diff --git a/controllers/controller.string.js b/controllers/controller.string.js index 7d5d4d7..57cb832 100644 --- a/controllers/controller.string.js +++ b/controllers/controller.string.js @@ -17,6 +17,7 @@ var StringController = function() { input.select(); }, false); + // TODO: getting messed up on ctrl a input.addEventListener('keyup', function() { _this.setValue(input.value); }, false); diff --git a/demo/demo.css b/demo/demo.css index 1191128..9579001 100644 --- a/demo/demo.css +++ b/demo/demo.css @@ -48,14 +48,18 @@ h2 { margin-bottom: 24px; } +h2.collapsed { + padding-top:24px; + border-top: 1px solid #ccc; + margin-top: 0; + } + +/* h2.collapsed { float: left; clear: both; - padding-top:24px; - margin-top: 0; - border-top: 1px solid #ccc; width: 100%; cursor: pointer; } @@ -77,7 +81,7 @@ color: red; clear: both; display: none; -} +}*/ #helvetica-demo { position: absolute; diff --git a/gui.js b/gui.js index db6020a..9291dc3 100644 --- a/gui.js +++ b/gui.js @@ -26,6 +26,9 @@ var GUI = function() { var open = false; var width = 280; + + // Prevents checkForOverflow bug in which loaded gui appearance + // settings are not respected by presence of scrollbar. var explicitOpenHeight = false; var openHeight; @@ -315,7 +318,11 @@ var GUI = function() { // Compute sum height of controllers. checkForOverflow(); - openHeight = controllerHeight; + // Prevents checkForOverflow bug in which loaded gui appearance + // settings are not respected by presence of scrollbar. + if (!explicitOpenHeight) { + openHeight = controllerHeight; + } return controllerObject; @@ -406,6 +413,8 @@ var GUI = function() { controllerContainer.style.height = Math.round(curControllerContainerHeight)+'px'; checkForOverflow(); } + + // Load saved appearance: if (GUI.guiIndex < GUI.savedAppearanceVars.length) { @@ -413,9 +422,8 @@ var GUI = function() { _this.domElement.style.width = width+"px"; openHeight = parseInt(GUI.savedAppearanceVars[GUI.guiIndex][2]); - + explicitOpenHeight = true; if (eval(GUI.savedAppearanceVars[GUI.guiIndex][0]) == true) { - // TODO: weirdness on open ... this.show(); }