mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 20:20:44 +00:00
More fixes for the splitview.
This commit is contained in:
1 parent
014354432a
commit
9746e3d554
1 file changed
+9
-3
@@ -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]
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in new issue
Block a user