Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

노드 색상이 제대로 업데이트 되지 않는 버그 수정 #387

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions apps/websocket/src/yjs/yjs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
Loading