|
@@ -160,6 +160,13 @@ public class ComponentGroup: NSView, NibLoadable {
|
|
|
rect.origin.x += subView.window?.frame.origin.x ?? 0
|
|
|
rect.origin.y += subView.window?.frame.origin.y ?? 0
|
|
|
|
|
|
+ if(rect.origin.y < 0) {
|
|
|
+ rect.origin.y = 0
|
|
|
+ }
|
|
|
+
|
|
|
+ if(CGRectGetMaxX(rect) > CGRectGetMaxX(screenRect)) {
|
|
|
+ rect.origin.x = CGRectGetMaxX(screenRect) - rect.width
|
|
|
+ }
|
|
|
frame = rect
|
|
|
|
|
|
contentWindow.contentView?.addSubview(self)
|