Skip to content

Commit fc6b107

Browse files
Merge pull request #387 from boostcampwm-2024/bug-be-#368
노드 색상이 제대로 업데이트 되지 않는 버그 수정
2 parents 851df2e + 3ff2f68 commit fc6b107

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

apps/websocket/src/yjs/yjs.service.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ export class YjsService
182182
title: node.page.title,
183183
id: node.page.id,
184184
emoji: node.page.emoji,
185+
color: node.color,
185186
},
186187
position: {
187188
x: node.x,
188189
y: node.y,
189190
},
190-
color: node.color ?? '#FFFFFF',
191191
selected: false, // 기본적으로 선택되지 않음
192192
dragging: true,
193193
isHolding: false,
@@ -263,15 +263,10 @@ export class YjsService
263263
const node: any = nodesMap.get(key);
264264
if (node.type !== 'note') continue;
265265

266-
// node.data는 페이지에 대한 정보
267-
// const { id, color} = node.data;
268-
// TODO : 구조 분해 할당 쓰려다가 지금은 color를 받아오지 못 할 것 같아서 직접 꺼내왔습니다.
269-
// TODO : 색상 추가되면 변경하겠습니다.
270-
const id = node.data.id;
271-
const color = node.data.color ?? '#FFFFFF'
266+
const { id, color } = node.data;
272267
const { x, y } = node.position;
273268
const isHolding = node.isHolding;
274-
// const color = node.color ?? '#FFFFFF';
269+
275270
if (isHolding) continue;
276271

277272
const pageResponse = await axios.get(

0 commit comments

Comments
 (0)