-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature/#213 하위요소 블록 드래그앤드랍 구현 #226
The head ref may contain hidden characters: "Feature/#213_\uD558\uC704\uC694\uC18C_\uBE14\uB85D_\uB4DC\uB798\uADF8\uC564\uB4DC\uB78D_\uAD6C\uD604"
Conversation
…into Feature/#213_하위요소_블록_드래그앤드랍_구현 # Conflicts: # client/src/features/editor/Editor.tsx
@@ -300,17 +300,15 @@ export class BlockLinkedList extends LinkedList<Block> { | |||
if (targetNode.prev) { | |||
const prevNode = this.getNode(targetNode.prev); | |||
if (prevNode) prevNode.next = targetNode.next; | |||
} else { | |||
this.head = targetNode.next; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 밑으로 드래그했을때, 영상처럼 위에게 다 날라가는 원인이었습니다!
2024-11-28.4.49.09.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 이부분 관련해서 질문글을 쓰고있었는데.. ㅋㅋ 바로 답이 올라왔군요! 감사합니다.
저부분이 헤드에있던 녀석이 마지막으로 이동할때, 나머지 요소들이 재정렬될때 누락이 있었나보군요.. 대단하십니다 !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
영상을 보시면 첫번째 block을 밑으로 드래그할때만 버그가 발생했습니다,
2,3번째 block은 버그가 발생하지 않았습니다.
이유는 첫번째 block은 prev가 없는 상태인데, 그걸 밑으로 드래그합니다.
LinkedList의 head가 여전히 첫 번째 블록을 가리키고 있기에 연결이 망가집니다.
그래서 prev가 없는 경우(= head인 경우), 현재 head의 next(targetNode.next
)를 새로운 head로 업데이트해줘야합니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고많으셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고많으셨습니다 !!
|
||
interface BlockProps { | ||
id: string; | ||
block: CRDTBlock; | ||
dragBlockList: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string 으로 바뀌게된 이유가 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!!!
📝 변경 사항
🔍 변경 사항 설명
디벨롭이 필요한 부분
🙏 질문 사항
📷 스크린샷 (선택)
드래그앤 드롭 + backspace/shift+tab 누를시 indent 감소
2024-11-28.5.21.35.mov
ol, ul 동작 확인
2024-11-28.5.22.48.mov
✅ 작성자 체크리스트