Skip to content

An open-source, self-hosted system for apps built with web technologies.

A hand holds a Window at an edge 700 ms again before the view moves

zohayrslileh9f394020e3d9
diff --git a/source/client/view/structure/desktop/edge-hold.ts b/source/client/view/structure/desktop/edge-hold.ts
index 4618ef5..74f778c 100644
--- a/source/client/view/structure/desktop/edge-hold.ts
+++ b/source/client/view/structure/desktop/edge-hold.ts
@@ -32,12 +32,6 @@ export function useViewTravel(viewport: Viewport) {
}, [view.x, view.y, moveTo, reducedMotion, tempo, size.width, size.height])
}
-/**
- * How long a hand holds a Window against an edge before the view moves that way. Snapping waits at
- * the same edges, so this is long enough to reach an edge, see the snap, and let go first.
- */
-const edgeHoldDelay = 1500
-
/** Which edges of a box a point is held against, within 16 pixels: -1, 0 or 1 in each direction. */
export function against(x: number, y: number, width: number, height: number): Direction {
@@ -74,7 +68,7 @@ export class EdgeHold {
this.direction = direction
- if (direction.x || direction.y) this.timer = window.setTimeout(() => this.hold(), edgeHoldDelay)
+ if (direction.x || direction.y) this.timer = window.setTimeout(() => this.hold(), 700)
}
public stop() {