diff --git a/ui/src/GameSpace/Element/Element.svelte b/ui/src/GameSpace/Element/Element.svelte index db08c82..f2c4473 100644 --- a/ui/src/GameSpace/Element/Element.svelte +++ b/ui/src/GameSpace/Element/Element.svelte @@ -158,36 +158,6 @@ $: Element = elements[previewEl.type].Element as any; let highlighted = false; - // function handleMouseOver(ev: MouseEvent) { - // if (!$permissions.canEditComponents) return; - // if (!draggable) { - // highlighted = false; - // return; - // } - // let target: HTMLElement = ev.target as HTMLElement; - // while (true) { - // if (target === ev.currentTarget) { - // highlighted = true; - // break; - // } else if (target.draggable) { - // console.log('DRAGGABLE'); - // highlighted = false; - // break; - // } else if (target.tagName === 'BUTTON') { - // highlighted = false; - // break; - // } else if (target.tagName === 'IFRAME') { - // highlighted = false; - // break; - // } else { - // target = target.parentElement as HTMLElement; - // } - // } - // } - - // function handleMouseLeave() { - // highlighted = false; - // }
{ + if (isPanning) return; if (shouldHandlePanning(ev.target as HTMLElement)) { isPanning = true; const [panInitialX, panInitialY] = [panX, panY]; @@ -148,6 +149,7 @@ } function handleMouseUp() { + console.log('Ending panning'); isPanning = false; window.document.removeEventListener('mousemove', handleMouseMove); window.document.removeEventListener('mouseup', handleMouseUp); @@ -338,12 +340,6 @@ zoomLevel={zoom} /> {/each} -
{#if import.meta.env.MODE === 'development'}