Skip to content

Commit

Permalink
fix(client): container item moving
Browse files Browse the repository at this point in the history
  • Loading branch information
Veradictus committed Sep 4, 2023
1 parent 4aa2628 commit 5acbff2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/client/src/utils/press.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let holdTimeout: number | undefined;

// A touch is considered a hold if it lasts longer than 200ms.
// A touch is considered a hold if it lasts longer than 300ms.
const HOLD_TIME = 200;

/**
Expand Down Expand Up @@ -139,7 +139,7 @@ export function onDragDrop(
// When the user stops holding the item, drop the item.
function endHold(x: number, y: number) {
// If the user is not holding the item, cancel the hold.
if (!isHolding) return;
if (!isHolding) return cancelHold();

// Save the clone element in a variable.
let clone = dragClone;
Expand All @@ -166,6 +166,6 @@ export function onDragDrop(
dragClone = undefined;

// Remove the focused class from the item element.
element.classList.remove('item-slot-focused');
element.classList.remove('active');
}
}

0 comments on commit 5acbff2

Please sign in to comment.