1
0
Fork 0

props2.js: implement getValue(child,deflt)

This commit is contained in:
Torsten Dreyer 2015-03-26 11:41:27 +01:00
parent 49396ed83f
commit c427e1605f

View file

@ -12,8 +12,13 @@
this.json = json;
};
SGPropertyNode.prototype.getValue = function() {
return this.json.value;
SGPropertyNode.prototype.getValue = function(child,deflt) {
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() {