fix timeline popover
All checks were successful
All checks were successful
This commit is contained in:
@@ -447,13 +447,11 @@ class _ValueBlockMenu extends StatelessWidget {
|
|||||||
final overlay = Overlay.of(context);
|
final overlay = Overlay.of(context);
|
||||||
final renderBox = overlay?.context.findRenderObject() as RenderBox?;
|
final renderBox = overlay?.context.findRenderObject() as RenderBox?;
|
||||||
if (renderBox == null) return;
|
if (renderBox == null) return;
|
||||||
|
// Translate from global screen coordinates into the overlay's local space
|
||||||
|
// so the menu appears where the gesture happened.
|
||||||
|
final localPosition = renderBox.globalToLocal(globalPosition);
|
||||||
final position = RelativeRect.fromRect(
|
final position = RelativeRect.fromRect(
|
||||||
Rect.fromLTWH(
|
Rect.fromLTWH(localPosition.dx, localPosition.dy, 1, 1),
|
||||||
globalPosition.dx,
|
|
||||||
globalPosition.dy,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
Offset.zero & renderBox.size,
|
Offset.zero & renderBox.size,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user