Skip to content

Commit

Permalink
remove unused mousedown on preview element
Browse files Browse the repository at this point in the history
  • Loading branch information
lovincyrus committed Dec 22, 2024
1 parent cebb669 commit 7fdc3a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion web-common/src/features/canvas/CanvasComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
class:!cursor-default={embed}
style:z-index={renderer === "select" ? 100 : localZIndex}
on:contextmenu
on:mousedown|capture
on:pointerenter
on:pointerleave
>
Expand Down
9 changes: 0 additions & 9 deletions web-common/src/features/canvas/PreviewElement.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
$: finalTop = height < 0 ? top + height : top;
$: finalWidth = Math.abs(width);
$: finalHeight = Math.abs(height);
function handleMouseDown(e: MouseEvent) {
if (e.button !== 0) return;
dispatch("mousedown", {
e,
});
}
</script>

{#if componentName && !inlineComponent}
Expand All @@ -51,7 +44,6 @@
width={finalWidth}
on:change
on:contextmenu
on:mousedown={handleMouseDown}
/>
</ContextMenu.Trigger>

Expand Down Expand Up @@ -84,7 +76,6 @@
width={finalWidth}
on:change
on:contextmenu
on:mousedown={handleMouseDown}
/>
</ContextMenu.Trigger>

Expand Down

0 comments on commit 7fdc3a7

Please sign in to comment.