fix: restore artboard creation and drag on canvas
Canvas.tsx: removed the `e.target === e.currentTarget` guard on the artboard-creation click handler. The canvas has a full-size position:absolute transform layer that intercepts all events, making `e.target` never equal to `e.currentTarget`. Artboard creation was silently broken for every click. Artboard.tsx: added `onMouseDown` stopPropagation to the artboard root div so clicks on an existing artboard don't bubble up and trigger the creation path now that the guard is gone. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7ff343c5a1
commit
8514ffdc1a
@@ -165,6 +165,7 @@ export function Artboard({ id, label, x, y, width, height, renderUrl }: Artboard
|
||||
return (
|
||||
<div
|
||||
style={{ position: 'absolute', top: effectiveY, left: effectiveX }}
|
||||
onMouseDown={(e) => e.stopPropagation()}
|
||||
onClick={(e) => { e.stopPropagation(); selectArtboard(id); }}
|
||||
>
|
||||
{/* Label / drag handle */}
|
||||
|
||||
Reference in New Issue
Block a user