From 3ff2f6876e36c161fad49f90c35e29dd202687e3 Mon Sep 17 00:00:00 2001 From: Hyunjun KIM Date: Tue, 3 Dec 2024 21:55:25 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20node.color=EB=A5=BC=20=EA=B5=AC=EC=A1=B0?= =?UTF-8?q?=EB=B6=84=ED=95=B4=ED=95=A0=EB=8B=B9=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B0=9B=EC=95=84=EC=98=A4=EA=B3=A0,=20=EA=B8=B0=EB=B3=B8=20?= =?UTF-8?q?=EA=B0=92=EC=9D=84=20=EC=84=A4=EC=A0=95=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/websocket/src/yjs/yjs.service.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/websocket/src/yjs/yjs.service.ts b/apps/websocket/src/yjs/yjs.service.ts index 71ae7730..2f64c638 100644 --- a/apps/websocket/src/yjs/yjs.service.ts +++ b/apps/websocket/src/yjs/yjs.service.ts @@ -182,12 +182,12 @@ export class YjsService title: node.page.title, id: node.page.id, emoji: node.page.emoji, + color: node.color, }, position: { x: node.x, y: node.y, }, - color: node.color ?? '#FFFFFF', selected: false, // 기본적으로 선택되지 않음 dragging: true, isHolding: false, @@ -263,15 +263,10 @@ export class YjsService const node: any = nodesMap.get(key); if (node.type !== 'note') continue; - // node.data는 페이지에 대한 정보 - // const { id, color} = node.data; - // TODO : 구조 분해 할당 쓰려다가 지금은 color를 받아오지 못 할 것 같아서 직접 꺼내왔습니다. - // TODO : 색상 추가되면 변경하겠습니다. - const id = node.data.id; - const color = node.data.color ?? '#FFFFFF' + const { id, color } = node.data; const { x, y } = node.position; const isHolding = node.isHolding; - // const color = node.color ?? '#FFFFFF'; + if (isHolding) continue; const pageResponse = await axios.get(