修复画布图片备注面板不弹出问题

This commit is contained in:
Your Name 2026-02-08 12:11:20 +08:00
parent 4e0c0d9cd0
commit 23b48884a9

View File

@ -273,7 +273,6 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
setTextEditPanelOpen(false); setTextEditPanelOpen(false);
setIsEditingTitle(false); setIsEditingTitle(false);
setPromptDialogOpen(false); setPromptDialogOpen(false);
setNotePanelOpen(false);
} }
}, [isSelected]); }, [isSelected]);
@ -1814,9 +1813,9 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
)} )}
{/* 图片备注面板 */} {/* 图片备注面板 */}
{isSelected && notePanelOpen && typeof document !== "undefined" && createPortal( {notePanelOpen && typeof document !== "undefined" && createPortal(
<div <div
className="fixed z-[9999] w-[300px] rounded-xl border border-amber-200 bg-amber-50/95 shadow-2xl backdrop-blur" className="fixed z-[10001] w-[300px] rounded-xl border border-amber-200 bg-amber-50/95 shadow-2xl backdrop-blur"
style={{ style={{
top: getNotePanelPosition().top, top: getNotePanelPosition().top,
left: getNotePanelPosition().left, left: getNotePanelPosition().left,