mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Added updateValue method to StringController (so watched string controllers update).
Moved easing from margin-top to height. It's now showing an ugly scrollbar jump. Hmm...
This commit is contained in:
parent
25f2d64c74
commit
46b5d1ff24
@ -4,24 +4,30 @@ var StringController = function() {
|
||||
|
||||
var _this = this;
|
||||
|
||||
Controller.apply(this, arguments);
|
||||
Controller.apply(this, arguments);
|
||||
|
||||
var input = document.createElement('input');
|
||||
var input = document.createElement('input');
|
||||
|
||||
var initialValue = this.getValue();
|
||||
var initialValue = this.getValue();
|
||||
|
||||
input.setAttribute('value', initialValue);
|
||||
input.setAttribute('spellcheck', 'false');
|
||||
this.domElement.addEventListener('mouseup', function() {
|
||||
input.focus();
|
||||
input.select();
|
||||
}, false);
|
||||
input.setAttribute('value', initialValue);
|
||||
input.setAttribute('spellcheck', 'false');
|
||||
|
||||
input.addEventListener('keyup', function() {
|
||||
_this.setValue(input.value);
|
||||
}, false);
|
||||
this.domElement.addEventListener('mouseup', function() {
|
||||
input.focus();
|
||||
input.select();
|
||||
}, false);
|
||||
|
||||
input.addEventListener('keyup', function() {
|
||||
_this.setValue(input.value);
|
||||
}, false);
|
||||
|
||||
this.domElement.appendChild(input);
|
||||
|
||||
this.updateValue = function(val) {
|
||||
input.setAttribute('value', val);
|
||||
}
|
||||
|
||||
this.domElement.appendChild(input);
|
||||
};
|
||||
StringController.prototype = new Controller();
|
||||
StringController.prototype.constructor = StringController;
|
6
gui.css
6
gui.css
@ -8,9 +8,6 @@
|
||||
left: 100%;
|
||||
margin-left: -300px;
|
||||
background-color: #fff;
|
||||
-moz-transition: margin-top .2s ease-out;
|
||||
-webkit-transition: margin-top .2s ease-out;
|
||||
transition: margin-top .2s ease-out;
|
||||
-webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
|
||||
@ -26,6 +23,9 @@
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
-moz-transition: height .2s ease-out;
|
||||
-webkit-transition: height .2s ease-out;
|
||||
transition: height .2s ease-out;
|
||||
}
|
||||
|
||||
#guidat-toggle {
|
||||
|
Loading…
Reference in New Issue
Block a user