mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Fixed bug if direct access returned 0
This commit is contained in:
parent
1fd9084574
commit
f00d4cc957
@ -42,7 +42,7 @@ DAT.GUI.Controller.prototype.unlisten = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DAT.GUI.Controller.prototype.setValue = function(n) {
|
DAT.GUI.Controller.prototype.setValue = function(n) {
|
||||||
if(this.object[this.propertyName]){
|
if(this.object[this.propertyName] != undefined){
|
||||||
this.object[this.propertyName] = n;
|
this.object[this.propertyName] = n;
|
||||||
}else{
|
}else{
|
||||||
var o = new Object();
|
var o = new Object();
|
||||||
@ -57,7 +57,8 @@ DAT.GUI.Controller.prototype.setValue = function(n) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DAT.GUI.Controller.prototype.getValue = function() {
|
DAT.GUI.Controller.prototype.getValue = function() {
|
||||||
var val = this.object[this.propertyName] || this.object.get(this.propertyName);
|
var val = this.object[this.propertyName];
|
||||||
|
if(val == undefined) this.object.get(this.propertyName);
|
||||||
return val;
|
return val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -306,7 +306,8 @@ DAT.GUI = function(parameters) {
|
|||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var value = object[propertyName] || (object.get && object.get(propertyName));
|
var value = object[propertyName];
|
||||||
|
if(value == undefined && object.get) value = object.get(propertyName));
|
||||||
|
|
||||||
// Does this value exist? Is it accessible?
|
// Does this value exist? Is it accessible?
|
||||||
if (value == undefined) {
|
if (value == undefined) {
|
||||||
|
Loading…
Reference in New Issue
Block a user