summaryrefslogtreecommitdiff
path: root/apps/web
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-07-01 19:16:37 +0200
committerMaze Winther <mazewinther@gmail.com>2025-07-01 19:16:37 +0200
commit394d9f684c8643cba9fe02991894203713ce99d7 (patch)
tree7b751384bb35a3d115baf8ae4f961f4d09c2c087 /apps/web
parent90eaa40bc6f4283018479d0edf0635da45770fd0 (diff)
downloadopencut-394d9f684c8643cba9fe02991894203713ce99d7.tar.gz
refactor: clean up comments
Diffstat (limited to 'apps/web')
-rw-r--r--apps/web/src/components/editor/timeline.tsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/web/src/components/editor/timeline.tsx b/apps/web/src/components/editor/timeline.tsx
index 6d1a19ad..d43ae588 100644
--- a/apps/web/src/components/editor/timeline.tsx
+++ b/apps/web/src/components/editor/timeline.tsx
@@ -732,14 +732,11 @@ export function Timeline() {
const menuWidth = 160;
const menuHeight = 200;
const margin = 4;
-
- // ADJUSTABLE VALUE: Change this to move menu up/down when it appears above cursor
- const verticalOffset = 80; // Reduce this to bring menu closer to cursor when above
+ const verticalOffset = 80;
const viewportWidth = window.innerWidth;
const viewportHeight = window.innerHeight;
- // Start with Windows-style default position
let adjustedX = x + 2;
let adjustedY = y + 2;
@@ -755,9 +752,8 @@ export function Timeline() {
adjustedX = margin;
}
- // Vertical positioning with adjustable offset
+ // Vertical positioning
if (adjustedY + menuHeight > viewportHeight - margin) {
- // Instead of y - menuHeight - 2, use adjustable offset
adjustedY = y - menuHeight + verticalOffset;
if (adjustedY < margin) {
@@ -769,7 +765,6 @@ export function Timeline() {
adjustedY = margin;
}
- // Final safety clamp
adjustedX = Math.max(
margin,
Math.min(adjustedX, viewportWidth - menuWidth - margin)