From 5a5304073ef059fe5b16f6966c11908c83cb42df Mon Sep 17 00:00:00 2001 From: Karen Mkrtumyan Date: Mon, 23 Jun 2025 00:26:44 +0400 Subject: [PATCH] Add onDoubleClick for notes and areas as edit (#503) --- src/components/EditorCanvas/Area.jsx | 1 + src/components/EditorCanvas/Note.jsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/EditorCanvas/Area.jsx b/src/components/EditorCanvas/Area.jsx index 9eb82b5..03e69b6 100644 --- a/src/components/EditorCanvas/Area.jsx +++ b/src/components/EditorCanvas/Area.jsx @@ -128,6 +128,7 @@ export default function Area({ : "border-slate-400 opacity-100" }`} style={{ backgroundColor: `${data.color}66` }} + onDoubleClick={edit} >
diff --git a/src/components/EditorCanvas/Note.jsx b/src/components/EditorCanvas/Note.jsx index 48d859d..bc69534 100644 --- a/src/components/EditorCanvas/Note.jsx +++ b/src/components/EditorCanvas/Note.jsx @@ -135,6 +135,7 @@ export default function Note({ data, onPointerDown }) { // https://stackoverflow.com/a/70976017/1137077 e.target.releasePointerCapture(e.pointerId); }} + onDoubleClick={edit} >