mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 06:37:14 -04:00
[infra_ui][overlay] Implement remaining overlap behavior
This commit is contained in:
parent
efa78dd456
commit
9b6871803a
2 changed files with 18 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue