Skip to content

Commit

Permalink
Fix move confirmation when cursor is on resize handle
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-lednev committed Aug 17, 2023
1 parent 9c59acb commit 5596d9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ui/components/task.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<div
class="resize-handle absolute-stretch-x"
on:mousedown|stopPropagation={handleResizeStart}
on:mouseup|stopPropagation={() =>
on:mouseup={() =>
handleResizeConfirm(text, height, startMinutes)}
></div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/ui/hooks/use-resize.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { sizeToDuration } from "src/store/timeline-store";
import { updateTimestamps } from "src/store/update-timestamp";
import { writable } from "svelte/store";
import { get, writable } from "svelte/store";

export function useResize() {
const resizing = writable(false);
Expand All @@ -19,6 +19,10 @@ export function useResize() {
// todo: don't need start minutes here
startMinutes: number,
) {
if (!get(resizing)) {
return;
}

resizing.set(false);

const newDurationMinutes = sizeToDuration(taskHeight);
Expand Down

0 comments on commit 5596d9e

Please sign in to comment.