From 7339bb5da154c3d972e6f6c0dbf3e6f54f8acca7 Mon Sep 17 00:00:00 2001 From: menghao Date: Mon, 3 Aug 2026 15:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E7=BC=93=E8=B5=84=E6=BA=90=E5=8D=A1?= =?UTF-8?q?=E6=8B=96=E5=8A=A8=E5=B9=B6=E7=BB=9F=E4=B8=80=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除资源卡 Pointer 拖动入口并保留点击详情 改写交互与布局测试,覆盖指针不改坐标且不提交 CAS 同步工作台 PRD、技术方案和项目决策记录 --- apps/ai-game-creator-shell/src/styles.css | 14 +- .../src/view/project-development/index.tsx | 267 +---------- .../useProjectResourceCanvasLayout.ts | 6 +- .../appSurface/project-development.suite.ts | 451 +++--------------- .../useProjectResourceCanvasLayout.test.ts | 10 +- ...AI游戏创作】项目开发工作台PRD-2026-07-20.md | 54 ++- .../shared-memory/decision-log.md | 15 +- ...案】AI游戏创作智能体App实施计划-2026-06-24.md | 22 +- 8 files changed, 130 insertions(+), 709 deletions(-) diff --git a/apps/ai-game-creator-shell/src/styles.css b/apps/ai-game-creator-shell/src/styles.css index 75f08c70f..3014f539e 100644 --- a/apps/ai-game-creator-shell/src/styles.css +++ b/apps/ai-game-creator-shell/src/styles.css @@ -4041,11 +4041,10 @@ iframe.preview-frame { color: #4e382f; text-align: left; box-shadow: 0 6px 18px rgb(96 62 47 / 6%); - cursor: grab; - touch-action: none; + cursor: pointer; + touch-action: manipulation; user-select: none; transform: translate3d(var(--resource-x, 0), var(--resource-y, 0), 0); - will-change: transform; } .game-resource-card:hover, @@ -4056,15 +4055,6 @@ iframe.preview-frame { box-shadow: 0 8px 22px rgb(195 105 62 / 15%); } -.game-resource-card.is-dragging { - z-index: 2; - opacity: 0.72; - cursor: grabbing; - box-shadow: - 0 12px 28px rgb(195 105 62 / 24%), - 0 0 0 2px rgb(213 123 81 / 18%); -} - .game-resource-card.is-relation-upstream, .game-resource-card.is-relation-downstream, .game-resource-card.is-relation-both { diff --git a/apps/ai-game-creator-shell/src/view/project-development/index.tsx b/apps/ai-game-creator-shell/src/view/project-development/index.tsx index 99870dfe7..0186d1110 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/index.tsx +++ b/apps/ai-game-creator-shell/src/view/project-development/index.tsx @@ -42,14 +42,7 @@ import { LocalGamePreviewFrame, resolveEmbeddedPreviewUrl, } from '../../features/project-workspace/LocalGamePreviewFrame'; -import { - RESOURCE_CANVAS_CARD_HEIGHT, - RESOURCE_CANVAS_CARD_WIDTH, - RESOURCE_CANVAS_COLUMN_GAP, - RESOURCE_CANVAS_DRAG_THRESHOLD, - RESOURCE_CANVAS_ROW_GAP, - resourceCanvasSectionExtent, -} from './resourceCanvasLayoutModel'; +import { resourceCanvasSectionExtent } from './resourceCanvasLayoutModel'; import { EMPTY_PROJECT_RESOURCE_GRAPH, normalizeProjectResourceGraph, @@ -58,10 +51,7 @@ import { type ProjectResourceGraphNodeInput, type ProjectResourceGraphReadModel, } from './resourceDependencyGraphModel'; -import { - ResourceDependencyOverlay, - type ResourceDependencyOverlayHandle, -} from './ResourceDependencyOverlay'; +import { ResourceDependencyOverlay } from './ResourceDependencyOverlay'; import { useProjectResourceCanvasLayout } from './useProjectResourceCanvasLayout'; type AttachmentResult = { @@ -82,22 +72,6 @@ type Point = { y: number; }; -type ResourceCardDrag = { - pointerId: number; - resourceId: string; - section: ResourceCategory; - startClientX: number; - startClientY: number; - startX: number; - startY: number; - moved: boolean; - element: HTMLButtonElement; - plane: HTMLElement | null; - planeBaseWidth: number; - planeBaseHeight: number; - visualGutter: number; -}; - type ProjectResource = { id: string; category: ResourceCategory; @@ -455,41 +429,28 @@ function summarizeAgent( const ResourceCard = memo(function ResourceCard({ resource, selected, - dragging, relationState, x, y, onSelect, - onPointerDown, - onPointerMove, - onPointerUp, - onPointerCancel, }: { resource: ProjectResource; selected: boolean; - dragging: boolean; relationState: 'upstream' | 'downstream' | 'both' | null; x: number; y: number; onSelect: (resourceId: string) => void; - onPointerDown: ( - event: ReactPointerEvent, - resource: ProjectResource, - ) => void; - onPointerMove: (event: ReactPointerEvent) => void; - onPointerUp: (event: ReactPointerEvent) => void; - onPointerCancel: (event: ReactPointerEvent) => void; }) { const Icon = categoryIcons[resource.category]; return (