Opened 13 years ago

Last modified 13 years ago

#8454 closed defect

_LayoutWidget not always resizing properly — at Initial Version

Reported by: Mike Wilcox Owned by: wildbill
Priority: high Milestone: tbd
Component: Dijit Version: 1.2.3
Keywords: _LayoutWidget BorderContainer Cc:
Blocked By: Blocking:

Description

This condition occurs when the top-most parent widget of a BorderConatiner? is the size of the page. I assume that the calculations done are based on the fact that the parent may be in a div or a table, and not taking up the whole page.

While the whole-page situation does not fail; it does not update properly, and looks like it is checking for width change and not a height change.

The bug witnessed happens when resizing the page to it's minWidth (non-IE case) and then resizing it up and down. Because the width doesn't change, the resize is not triggered.

Here is the code I used in our app to over-ride this behavior:

dijit.layout._LayoutWidget.prototype._resize = dijit.layout._LayoutWidget.prototype.resize; dijit.layout._LayoutWidget.prototype.resize = function(changeSize, resultSize){

in our case this is the parent if(this.id=="layoutNode"){

changeSize = dijit.getViewport();

} this._resize(changeSize, resultSize);

} After this fix, the resize works very smoothly.

I don't know the mechanism of the BorderContainer? well enough to know if the above example is reasonable or not. I suggest possibly a property along the lines of: isWholePage

Change History (0)

Note: See TracTickets for help on using tickets.