mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Fix: numbers were uneditable when using listen()
This commit is contained in:
parent
8f0eba8ade
commit
badb5b3b1d
@ -903,8 +903,11 @@ dat.controllers.NumberControllerBox = (function (NumberController, dom, common)
|
||||
{
|
||||
|
||||
updateDisplay: function() {
|
||||
|
||||
this.__input.value = this.__truncationSuspended ? this.getValue() : roundToDecimal(this.getValue(), this.__precision);
|
||||
// Use the same solution from StringController.js to enable
|
||||
// editing <input>s while "listen()"ing
|
||||
if (!dom.isActive(this.__input)) {
|
||||
this.__input.value = this.__truncationSuspended ? this.getValue() : roundToDecimal(this.getValue(), this.__precision);
|
||||
}
|
||||
return NumberControllerBox.superclass.prototype.updateDisplay.call(this);
|
||||
}
|
||||
|
||||
|
24
build/dat.gui.min.js
vendored
24
build/dat.gui.min.js
vendored
File diff suppressed because one or more lines are too long
@ -114,8 +114,11 @@ define([
|
||||
{
|
||||
|
||||
updateDisplay: function() {
|
||||
|
||||
this.__input.value = this.__truncationSuspended ? this.getValue() : roundToDecimal(this.getValue(), this.__precision);
|
||||
// Use the same solution from StringController.js to enable
|
||||
// editing <input>s while "listen()"ing
|
||||
if (!dom.isActive(this.__input)) {
|
||||
this.__input.value = this.__truncationSuspended ? this.getValue() : roundToDecimal(this.getValue(), this.__precision);
|
||||
}
|
||||
return NumberControllerBox.superclass.prototype.updateDisplay.call(this);
|
||||
}
|
||||
|
||||
|
@ -6,3 +6,12 @@ require('./builder.js').build({
|
||||
"shortcut": "dat.GUI",
|
||||
"paths": {}
|
||||
});
|
||||
|
||||
require('./builder.js').build({
|
||||
"baseUrl": "../src/",
|
||||
"main": "dat/gui/GUI",
|
||||
"out": "../build/dat.gui.min.js",
|
||||
"minify": true,
|
||||
"shortcut": "dat.GUI",
|
||||
"paths": {}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user