More fixes for the splitview.

This commit is contained in:
Randall Luecke committed 2011-03-23 13:26:38 -04:00
1 parent 014354432a
commit 9746e3d554
1 file changed
+9 -3
+9 -3
View File
@@ -268,15 +268,21 @@ var CPSplitViewHorizontalImage = nil,
- (void)willRemoveSubview:(CPView)aView
{
#if PLATFORM(DOM)
CPDOMDisplayServerRemoveChild(_DOMElement, _DOMDividerElements.pop());
var dividerToRemove = _DOMDividerElements.pop();
// The divider may not exist if we never rendered out the DOM.
if (dividerToRemove)
CPDOMDisplayServerRemoveChild(_DOMElement, dividerToRemove);
#endif
_needsResizeSubviews = YES;
[self setNeedsLayout];
[self setNeedsDisplay:YES];
}
// because we have to wait for the subview to ACTUALLY be removed, we need to wait until the next runloop to recalculate everything.
window.setTimeout(function(){[self _adjustSubviewsWithCalculatedSize]},0);
- (void)layoutSubviews
{
[self _adjustSubviewsWithCalculatedSize]
}
/*!