Add onDoubleClick for notes and areas as edit (#503)

This commit is contained in:
Karen Mkrtumyan
2025-06-23 00:26:44 +04:00
committed by GitHub
parent 395ba457bd
commit 5a5304073e
2 changed files with 2 additions and 0 deletions

View File

@@ -128,6 +128,7 @@ export default function Area({
: "border-slate-400 opacity-100"
}`}
style={{ backgroundColor: `${data.color}66` }}
onDoubleClick={edit}
>
<div className="flex justify-between gap-1 w-full">
<div className="text-color select-none overflow-hidden text-ellipsis">

View File

@@ -135,6 +135,7 @@ export default function Note({ data, onPointerDown }) {
// https://stackoverflow.com/a/70976017/1137077
e.target.releasePointerCapture(e.pointerId);
}}
onDoubleClick={edit}
>
<path
d={`M${data.x + noteFold} ${data.y} L${data.x + noteWidth - noteRadius} ${