Skip to content

Commit 5aedb39

Browse files
committed
Update ContextualMenuPlugin.swift
1 parent 7743ba8 commit 5aedb39

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

macos/Classes/ContextualMenuPlugin.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,15 @@ public class ContextualMenuPlugin: NSObject, FlutterPlugin {
6161
}
6262
}
6363

64-
if (placement == "topRight") {
64+
if (placement == "topLeft") {
6565
x -= menu?.size.width ?? 0
66+
y += menu?.size.height ?? 0
67+
} else if (placement == "topRight") {
68+
y += menu?.size.height ?? 0
69+
} else if (placement == "bottomLeft") {
70+
x -= menu?.size.width ?? 0
71+
} else if (placement == "bottomRight") {
72+
// skip
6673
}
6774

6875
menu?.popUp(

0 commit comments

Comments
 (0)