js/foundation/json_renderer/json_renderer.js in rsence-2.0.0.0.pre vs js/foundation/json_renderer/json_renderer.js in rsence-2.0.0.pre
- old
+ new
@@ -46,10 +46,11 @@
this.scopes = [window];
this.scopeDepth = 0;
this.view = this.renderNode( this.data, this.parent );
},
defineInScope: function( _definition ){
+ console.log('definedInScope(',_definition,')');
var _isArr = (_definition instanceof Array),
_isObj = (_definition instanceof Object);
if( _isArr || !_isObj ){
console.log("JSONRenderer; definition must be an Object, got: '"+(typeof _definition)+"'. Definition: ",_definition);
return;
@@ -129,11 +130,11 @@
_class = this.findInScope( _className ),
// Currently only HView -derived classes are supported, so
// the rect is mandatory.
_rect = _dataNode['rect'],
- _hasRect = (_rect !== undefined) && (_rect instanceof Array || typeof _rect === 'string'),
+ _hasRect = (_rect !== undefined) && (_rect instanceof Array),
// Checks, if any sub-views are defined.
_hasSubviews = _dataNode['subviews'] !== undefined,
_subViews = _hasSubviews?_dataNode['subviews']:null,
@@ -154,9 +155,10 @@
i,
_subView;
// console.log('className:',_className,' class:',_class);
+
this.scopeDepth ++;
this.scopes.push({});
try{
if(_hasDefinition){
if(_definitions instanceof Array){