diff --git a/components/canvas/nodes/ImageNode.tsx b/components/canvas/nodes/ImageNode.tsx index 3487e63de..f4562af47 100644 --- a/components/canvas/nodes/ImageNode.tsx +++ b/components/canvas/nodes/ImageNode.tsx @@ -407,25 +407,6 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) { return { top, left }; }; - const getNotePanelPosition = () => { - if (!containerRef.current || typeof window === "undefined") { - return { top: 0, left: 0 }; - } - - const rect = containerRef.current.getBoundingClientRect(); - const panelWidth = 300; - const spacing = 12; - const maxTop = Math.max(12, window.innerHeight - 360); - - let left = rect.right + spacing; - if (left + panelWidth > window.innerWidth - 12) { - left = Math.max(12, rect.left - panelWidth - spacing); - } - - const top = Math.min(Math.max(12, rect.top + 8), maxTop); - return { top, left }; - }; - const displayTitle = getImageNodeTitle(data, node.id); const handleSaveTitle = useCallback(() => { @@ -1814,66 +1795,37 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) { document.body )} - {/* 图片备注面板 */} - {notePanelOpen && typeof document !== "undefined" && createPortal( -
e.stopPropagation()} - onPointerDown={(e) => e.stopPropagation()} - onClick={(e) => e.stopPropagation()} - > -
-
- - 图片备注 -
- -
- -
+ {/* 图片备注对话框 */} + + + + + + 图片备注 + + +