{ // Capture the position when context menu is triggered const flowPosition = screenToFlowPosition({ x: e.clientX, y: e.clientY }) contextMenuPosition = { x: flowPosition.x, y: flowPosition.y - yOffset } }} role="button" tabindex="0" aria-label="Click and drag to create a note, or right-click to add a sticky note" onkeydown={(e) => { if (e.key === 'Escape') { if (isDrawing) { // Cancel current drawing isDrawing = false startPosition = null } else { // Exit note mode exitNoteMode?.() } } }} > {#if previewNote}
{/if}