{
dragging = false
}}
ondragstart={() => {
dragging = true
}}
ondragend={() => {
dragging = false
}}
onmouseenter={handleMouseEnter}
onmouseleave={handleMouseLeave}
role="note"
>
{#if isEditModeAvailable}
{#if !locked}
{/if}
{#if !locked}
{/if}
{/if}
{#if hovering || selected}
{#if !editMode && isEditModeAvailable}
{locked
? 'Note is locked'
: isEditModeAvailable
? 'Double click to edit'
: 'View only mode'}
{:else if !locked && isEditModeAvailable}
GH Markdown
{/if}
{/if}
{#if editMode}
{:else}
{#if textForDisplay}
{:else}
Double-click to add a note
{/if}
{/if}
{#if !locked && isEditModeAvailable}
{
// Update note size when resizing ends
if (params.width !== undefined && params.height !== undefined) {
const size = { width: params.width, height: params.height }
if (isEditModeAvailable && noteEditorContext?.noteEditor) {
// Use NoteEditor context in edit mode
noteEditorContext.noteEditor.updateSize(data.noteId, size)
}
}
}}
/>
{/if}