props2.js: implement getValue(child,deflt)
This commit is contained in:
parent
49396ed83f
commit
c427e1605f
1 changed files with 7 additions and 2 deletions
|
@ -12,8 +12,13 @@
|
||||||
this.json = json;
|
this.json = json;
|
||||||
};
|
};
|
||||||
|
|
||||||
SGPropertyNode.prototype.getValue = function() {
|
SGPropertyNode.prototype.getValue = function(child,deflt) {
|
||||||
return this.json.value;
|
if( typeof(child) === 'undefined' )
|
||||||
|
return this.json.value;
|
||||||
|
|
||||||
|
var c = this.getNode(child);
|
||||||
|
if( c ) return c.getValue();
|
||||||
|
else return deflt;
|
||||||
}
|
}
|
||||||
|
|
||||||
SGPropertyNode.prototype.getName = function() {
|
SGPropertyNode.prototype.getName = function() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue