Skip to content

Commit

Permalink
feat: blokc interface isChecked ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
  • Loading branch information
pipisebastian committed Dec 2, 2024
1 parent 543f1e7 commit 60e5b7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions @noctaCrdt/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class Block extends Node<BlockId> {
icon: string;
crdt: BlockCRDT;
listIndex?: number;
isChecked?: boolean;

constructor(value: string, id: BlockId) {
super(value, id);
Expand All @@ -72,6 +73,7 @@ export class Block extends Node<BlockId> {
icon: this.icon,
crdt: this.crdt.serialize(),
listIndex: this.listIndex ? this.listIndex : null,
isChecked: this.isChecked ? this.isChecked : null,
};
}

Expand All @@ -87,6 +89,7 @@ export class Block extends Node<BlockId> {
block.icon = data.icon;
block.crdt = BlockCRDT.deserialize(data.crdt);
block.listIndex = data.listIndex ? data.listIndex : null;
block.isChecked = data.isChecked ? data.isChecked : null;
return block;
}
}
Expand Down

0 comments on commit 60e5b7c

Please sign in to comment.