fix(canvas): 智能体面板 - 修复交互失效与布局异常 (#152)

- 为 motion.aside 补充 pointer-events-auto,恢复面板内输入框、按钮等交互
- section 启用 flex 垂直布局并修正 paddingRight 条件,避免面板跑到下方
- PANEL_SLOT_TOP_OFFSET 从 288 调整为 80,移除活动任务面板不必要的预留空间

Closes #151

Co-authored-by: sikongyue <3155157671@qq.com>
This commit is contained in:
爱笑的毛毛虫
2026-08-05 23:12:57 +08:00
committed by GitHub
parent 1377c6bbe2
commit 4e5f255a4c
2 changed files with 7 additions and 5 deletions

View File

@@ -1383,9 +1383,9 @@ function InfiniteCanvasPage() {
<main id="canvas-main" tabIndex={-1} className="flex h-full min-h-0 overflow-hidden outline-none" style={{ background: theme.canvas.background, color: theme.node.text }}>
{shortDramaEnabled && currentProject?.projectId ? <CanvasProjectSidebar projectId={currentProject.projectId} detail={linkedProjectQuery.data} onAddChapter={handleProjectChapterInsert} onLocateStyle={locateProjectStyleNode} onOpenAssets={() => openProjectAssets()} /> : null}
<section
className="relative min-w-0 flex-1 overflow-hidden transition-[padding]"
className="relative min-w-0 flex-1 flex flex-col min-h-0 overflow-hidden transition-[padding]"
style={{
paddingRight: focusMode && anyPanelOpen ? panelColumnWidth : undefined,
paddingRight: anyPanelOpen ? panelColumnWidth : undefined,
}}
>
<CanvasTopBar
@@ -1449,6 +1449,7 @@ function InfiniteCanvasPage() {
<CanvasStylePickerModal open={stylePickerOpen} value={activeStylePresetId} onClose={() => setStylePickerOpen(false)} onSelect={selectCanvasStyle} />
<div className="relative flex-1 min-h-0">
<InfiniteCanvas
containerRef={containerRef}
viewport={viewport}
@@ -1541,6 +1542,7 @@ function InfiniteCanvasPage() {
onOpenDrawing={openDrawingNode}
/>
</InfiniteCanvas>
</div>
{angleNode?.metadata?.content ? (
<CanvasNodePanelOverlay node={angleNode} viewport={viewport} containerRef={containerRef} panelWidth={580} panelHeight={350}>