feat(annotations): add isResizable prop to AnnotationShape to render edit overlay

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-14 10:55:13 +02:00
parent f5362a5850
commit 3b756cd718
2 changed files with 56 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import type { Annotation } from '$lib/types';
import AnnotationEditOverlay from './AnnotationEditOverlay.svelte';
let {
annotation,
@@ -9,6 +10,7 @@ let {
dimmed = false,
blockNumber = undefined,
isFlashing = false,
isResizable = false,
onclick,
onpointerenter,
onpointerleave
@@ -20,6 +22,7 @@ let {
dimmed?: boolean;
blockNumber?: number | undefined;
isFlashing?: boolean;
isResizable?: boolean;
onclick: () => void;
onpointerenter: () => void;
onpointerleave: () => void;
@@ -109,6 +112,9 @@ let shapeStyle = $derived(
{blockNumber}
</div>
{/if}
{#if isResizable}
<AnnotationEditOverlay annotation={annotation} />
{/if}
</div>
<style>