From 995f1dbf995b7b1a128c06670ee7affab60e54f9 Mon Sep 17 00:00:00 2001
From: ddCat <2695092045@qq.com>
Date: Sat, 1 Aug 2026 10:35:48 +0800
Subject: [PATCH] =?UTF-8?q?fix(canvas):=20=E5=9B=BE=E7=89=87=E6=89=B9?=
=?UTF-8?q?=E6=AC=A1=E4=B8=BB=E5=9B=BE=20-=20=E5=8E=9F=E5=AD=90=E5=90=8C?=
=?UTF-8?q?=E6=AD=A5=E5=AA=92=E4=BD=93=E5=85=83=E6=95=B0=E6=8D=AE=E5=B9=B6?=
=?UTF-8?q?=E6=A0=87=E8=AE=B0=E5=BD=93=E5=89=8D=E4=B8=BB=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/components/canvas/canvas-node.tsx | 12 +++---
web/src/lib/canvas/canvas-project-domain.ts | 37 +++++++++++++------
.../canvas/canvas-project-world-layers.tsx | 1 +
.../pages/canvas/use-canvas-node-editor.ts | 4 +-
4 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/web/src/components/canvas/canvas-node.tsx b/web/src/components/canvas/canvas-node.tsx
index 6445f2741..816e69bba 100644
--- a/web/src/components/canvas/canvas-node.tsx
+++ b/web/src/components/canvas/canvas-node.tsx
@@ -43,6 +43,7 @@ type CanvasNodeProps = {
batchClosing?: boolean;
batchOpening?: boolean;
batchRecovering?: boolean;
+ batchPrimary?: boolean;
batchMotion?: { x: number; y: number; index: number };
onMouseDown: (event: React.MouseEvent, nodeId: string) => void;
onHoverStart: (nodeId: string) => void;
@@ -108,6 +109,7 @@ export const CanvasNode = React.memo(function CanvasNode({
batchClosing = false,
batchOpening = false,
batchRecovering = false,
+ batchPrimary = false,
batchMotion,
onMouseDown,
onHoverStart,
@@ -461,7 +463,7 @@ export const CanvasNode = React.memo(function CanvasNode({
{resourceLabel ? : null}
{hasMediaContent && !readOnly ? : null}
{isBatchRoot ? onToggleBatch?.(data.id)} /> : null}
- {isBatchChild && !readOnly ? onSetBatchPrimary?.(data)} /> : null}
+ {isBatchChild && !readOnly ? onSetBatchPrimary?.(data)} /> : null}
{data.metadata?.locked ? : null}
) : null}
@@ -802,11 +804,11 @@ function BatchToggleBadge({ count, expanded, theme, onToggle }: { count: number;
);
}
-function BatchPrimaryBadge({ visible, theme, onSelect }: { visible: boolean; theme: CanvasTheme; onSelect: () => void }) {
+function BatchPrimaryBadge({ visible, selected, theme, onSelect }: { visible: boolean; selected: boolean; theme: CanvasTheme; onSelect: () => void }) {
return (
-