From c63be0b7583c5fc0527a9b18c0bf6df55ba20637 Mon Sep 17 00:00:00 2001 From: Minhyung Cho Date: Sun, 1 Dec 2024 23:30:20 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EB=88=84=EB=A5=B4=EB=A9=B4=20=EA=B3=84?= =?UTF-8?q?=EC=86=8D=20=EB=96=B4=EB=8B=A4=EA=B0=80=20=EC=82=AC=EB=9D=BC?= =?UTF-8?q?=EC=A7=80=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/MindMapHeader/Profile.tsx | 5 +++-- client/src/components/MindMapHeader/ProfileModal.tsx | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/src/components/MindMapHeader/Profile.tsx b/client/src/components/MindMapHeader/Profile.tsx index ebdec2e6..1b2190bc 100644 --- a/client/src/components/MindMapHeader/Profile.tsx +++ b/client/src/components/MindMapHeader/Profile.tsx @@ -11,9 +11,10 @@ export default function Profile() { const { open: profileModal, openModal: openProfileModal, closeModal: closeProfileModal } = useModal(); const isAuthenticated = useConnectionStore((state) => state.token); - function handleProfileModal() { + function handleProfileModal(e) { + e.stopPropagation(); if (isAuthenticated) { - openProfileModal(); + profileModal ? closeProfileModal() : openProfileModal(); return; } openLoginModal(); diff --git a/client/src/components/MindMapHeader/ProfileModal.tsx b/client/src/components/MindMapHeader/ProfileModal.tsx index 6fe5b07a..4cdbc0b4 100644 --- a/client/src/components/MindMapHeader/ProfileModal.tsx +++ b/client/src/components/MindMapHeader/ProfileModal.tsx @@ -29,11 +29,11 @@ export default function ProfileModal({ open, close }: ProfileModalProps) { }; if (open) { - document.addEventListener("mousedown", handleClickOutside); + document.addEventListener("click", handleClickOutside); } return () => { - document.removeEventListener("mousedown", handleClickOutside); + document.removeEventListener("click", handleClickOutside); }; }, [open, close]); From 7dc22e2d99e0a2f6f519b8d0953dffde59b7ab60 Mon Sep 17 00:00:00 2001 From: Minhyung Cho Date: Sun, 1 Dec 2024 23:30:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore=20:=20=EB=85=B8=EB=93=9C=20=EC=83=89?= =?UTF-8?q?=EC=83=81=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/constants/color.ts | 2 +- client/src/konva_mindmap/components/MindMapNode.tsx | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/src/constants/color.ts b/client/src/constants/color.ts index f94c3a62..7a43622a 100644 --- a/client/src/constants/color.ts +++ b/client/src/constants/color.ts @@ -1 +1 @@ -export const colors = ["skyblue", "lightgreen", "lightcoral", "purple", "lemonchiffon"]; +export const colors = ["#0053B5", "#64B5F6", "#6B95BC", "#E6F4F1", "#FCFCD4"]; diff --git a/client/src/konva_mindmap/components/MindMapNode.tsx b/client/src/konva_mindmap/components/MindMapNode.tsx index d452ef25..eb8f41f7 100644 --- a/client/src/konva_mindmap/components/MindMapNode.tsx +++ b/client/src/konva_mindmap/components/MindMapNode.tsx @@ -72,7 +72,7 @@ export default function MindMapNode({ data, parentNode, node, depth, parentRef, selectNode({ nodeId: node.id, parentNodeId: parentNode ? parentNode.id : null }); } - const NodeStroke = selectedGroup.includes(node.id.toString()) ? "red" : ""; + const NodeStroke = selectedGroup.includes(node.id.toString()) ? "#cb575f" : ""; const handleDragMove = (e: Konva.KonvaEventObject) => { e.evt.preventDefault(); @@ -114,12 +114,11 @@ export default function MindMapNode({ data, parentNode, node, depth, parentRef, >