mirror of
https://github.com/AbaTekNTNU/followspot-psn.git
synced 2025-12-06 13:54:58 +00:00
Remove parent binding to child
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
let ws: WebSocket | null = $state(null);
|
||||
let image: HTMLImageElement | null = $state(null);
|
||||
|
||||
let parent: HTMLElement | null = $state(null);
|
||||
|
||||
let trackers: TrackerData[] = $state([
|
||||
{ id: 1, x: 0, y: 0 },
|
||||
{ id: 2, x: 0, y: 0 },
|
||||
@@ -39,26 +37,18 @@
|
||||
src="/scene_drawing.png"
|
||||
alt=""
|
||||
bind:this={image}
|
||||
class="scale-50"
|
||||
class="max-w-screen max-h-screen"
|
||||
onload={resize}
|
||||
/>
|
||||
<div
|
||||
bind:this={parent}
|
||||
class="absolute inset-0 border border-red-500"
|
||||
style={"width: " +
|
||||
width +
|
||||
"px; height: " +
|
||||
height +
|
||||
"px;" +
|
||||
"transform: translate(50%, 50%);"}
|
||||
>
|
||||
<div class="absolute inset-0 border border-red-500">
|
||||
{#each trackers as tracker}
|
||||
<Drag
|
||||
bind:id={tracker.id}
|
||||
bind:x={tracker.x}
|
||||
bind:y={tracker.y}
|
||||
bind:width
|
||||
bind:height
|
||||
{ws}
|
||||
{parent}
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user