mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[infra_ui][overlay] Implement remaining overlap behavior
This commit is contained in:
parent
efa78dd456
commit
9b6871803a
@ -264,7 +264,6 @@ class FlowyOverlayState extends State<FlowyOverlay> {
|
||||
),
|
||||
),
|
||||
];
|
||||
|
||||
return Stack(
|
||||
children: children..addAll(overlays),
|
||||
);
|
||||
|
@ -55,6 +55,24 @@ class OverlayLayoutDelegate extends SingleChildLayoutDelegate {
|
||||
constraints.maxHeight - anchorRect.bottom,
|
||||
));
|
||||
break;
|
||||
case AnchorDirection.topWithLeftAligned:
|
||||
childConstraints = BoxConstraints.loose(Size(
|
||||
constraints.maxWidth - anchorRect.left,
|
||||
anchorRect.top,
|
||||
));
|
||||
break;
|
||||
case AnchorDirection.topWithCenterAligned:
|
||||
childConstraints = BoxConstraints.loose(Size(
|
||||
constraints.maxWidth,
|
||||
anchorRect.top,
|
||||
));
|
||||
break;
|
||||
case AnchorDirection.topWithRightAligned:
|
||||
childConstraints = BoxConstraints.loose(Size(
|
||||
anchorRect.right,
|
||||
anchorRect.top,
|
||||
));
|
||||
break;
|
||||
case AnchorDirection.rightWithTopAligned:
|
||||
childConstraints = BoxConstraints.loose(Size(
|
||||
constraints.maxWidth - anchorRect.right,
|
||||
|
Loading…
Reference in New Issue
Block a user