fix(canvas): 创作工作区 - 收紧界面密度并改进 Agent 镂空标签
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useRef, useState, type PointerEvent, type KeyboardEvent } from "react";
|
||||
import { AGENT_PANEL_LAYOUT_KEY, changeAgentPanelLayout, clampAgentPanelLayout, restoreAgentPanelLayout, type AgentPanelGesture, type AgentPanelLayout } from "@/lib/canvas/agent-panel-layout";
|
||||
import { AGENT_PANEL_LAYOUT_KEY, changeAgentPanelLayout, clampAgentPanelLayout, defaultAgentPanelLayout, restoreAgentPanelLayout, type AgentPanelGesture, type AgentPanelLayout } from "@/lib/canvas/agent-panel-layout";
|
||||
|
||||
const viewport = () => ({ width: window.innerWidth, height: window.innerHeight });
|
||||
|
||||
@@ -69,6 +69,7 @@ export function useAgentPanelLayout() {
|
||||
|
||||
return {
|
||||
style: compact ? { left: 0, top: 8, width: "100%", height: "calc(100dvh - 8px)" } : layout,
|
||||
reset: () => setLayout(defaultAgentPanelLayout(viewport())),
|
||||
onResizeKeyDown,
|
||||
pointerHandlers: { onPointerDown, onPointerMove, onPointerUp, onPointerCancel: onPointerUp, onLostPointerCapture: () => { gestureRef.current = null; } },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user