mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-07-18 10:11:24 +00:00
Add onDoubleClick for notes and areas as edit (#503)
This commit is contained in:
@@ -128,6 +128,7 @@ export default function Area({
|
|||||||
: "border-slate-400 opacity-100"
|
: "border-slate-400 opacity-100"
|
||||||
}`}
|
}`}
|
||||||
style={{ backgroundColor: `${data.color}66` }}
|
style={{ backgroundColor: `${data.color}66` }}
|
||||||
|
onDoubleClick={edit}
|
||||||
>
|
>
|
||||||
<div className="flex justify-between gap-1 w-full">
|
<div className="flex justify-between gap-1 w-full">
|
||||||
<div className="text-color select-none overflow-hidden text-ellipsis">
|
<div className="text-color select-none overflow-hidden text-ellipsis">
|
||||||
|
@@ -135,6 +135,7 @@ export default function Note({ data, onPointerDown }) {
|
|||||||
// https://stackoverflow.com/a/70976017/1137077
|
// https://stackoverflow.com/a/70976017/1137077
|
||||||
e.target.releasePointerCapture(e.pointerId);
|
e.target.releasePointerCapture(e.pointerId);
|
||||||
}}
|
}}
|
||||||
|
onDoubleClick={edit}
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d={`M${data.x + noteFold} ${data.y} L${data.x + noteWidth - noteRadius} ${
|
d={`M${data.x + noteFold} ${data.y} L${data.x + noteWidth - noteRadius} ${
|
||||||
|
Reference in New Issue
Block a user