mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Working on string controller
This commit is contained in:
parent
ea585f0de4
commit
a960a0d1ca
@ -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);
|
||||
|
@ -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;
|
||||
|
14
gui.js
14
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;
|
||||
|
||||
@ -407,15 +414,16 @@ var GUI = function() {
|
||||
checkForOverflow();
|
||||
}
|
||||
|
||||
// Load saved appearance:
|
||||
|
||||
if (GUI.guiIndex < GUI.savedAppearanceVars.length) {
|
||||
|
||||
width = parseInt(GUI.savedAppearanceVars[GUI.guiIndex][1]);
|
||||
_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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user