js/foundation/view/view.js in rsence-pre-2.2.0.10 vs js/foundation/view/view.js in rsence-pre-2.2.0.11

- old
+ new

@@ -874,11 +874,16 @@ /** Gets the size of the parent. If the parent is the document body, uses the browser window size. **/ parentSize: function(){ if(this.parent.elemId === 0){ - var _winSize = ELEM.windowSize(); + var + _winSize = ELEM.windowSize(), + _docSize = ELEM.getScrollSize(0); + if( _docSize[0] > _winSize[0] || _docSize[1] > _winSize[1] ){ + _docSize = _winSize; + } return [ _winSize[0], _winSize[1] ]; } else { var _rect = this.parent.rect, @@ -1000,9 +1005,15 @@ } else if(_validTopOffset && _validBottomOffset){ _bottom = _parentHeight - _bottomOffset; _validHeight && this.setMinHeight( _height ); _bottom = _parentHeight - _bottomOffset; + } + if( _leftOffset > _right ){ + _right = _leftOffset; + } + if( _topOffset > _bottom ){ + _bottom = _topOffset; } this.rect = HRect.nu(_leftOffset,_topOffset,_right,_bottom); if(!this.rect.isValid){ console.log('---------------------------------------------');