@setoelkahfi / svara / commits / c8c1954

misc: edited comment on window overlap

mellbacon committed May 17, 2023 at 15:24 UTC c8c1954c9240336951d34da17943c44bf6d57558
1 file changed +2 -2
src/lib/utility/ContextMenu.svelte
+2 -2
@@ -30,7 +30,7 @@
30 cursorPos = {x: e.clientX, y: e.clientY}
31
32 // Adjust context menu position based on where it is on the window
33 - // If it overlaps with the window border then move it to the right/left accordingly
33 + // If it overlaps with the window border then move it to the right/left/top/bottom accordingly
34 if (windowSize.h - cursorPos.y < menuPos.h) {
35 cursorPos.y = cursorPos.y - menuPos.h
36 }
@@ -41,7 +41,7 @@
41
42 function getContextMenuDimension(node){
43 // This function will get context menu dimension
44 - // when navigation is shown => showMenu = true
44 + // when navigation is shown
45 let height = node.offsetHeight;
46 let width = node.offsetWidth;
47 menuPos = {