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

feat: 노드 생성 버튼 구현 #4

Merged
merged 2 commits into from
Aug 15, 2024
Merged

feat: 노드 생성 버튼 구현 #4

merged 2 commits into from
Aug 15, 2024

Conversation

Coalery
Copy link
Collaborator

@Coalery Coalery commented Aug 13, 2024

  • 노드 생성 버튼을 구현합니다.
  • label은 현재 랜덤 생성이며 이후 상황에 따라 수정될 수 있습니다.

@Coalery Coalery requested a review from cpprhtn August 13, 2024 16:32
@Coalery Coalery self-assigned this Aug 13, 2024
@@ -1,22 +1,24 @@
/// <reference path="../types/diagram.d.ts" />
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맨 위에 있어야 reference가 의도대로 동작하여 옮겼습니다.

Comment on lines +30 to +31
const mermaidElement = document.getElementById("diagram-canvas");
mermaidElement.removeAttribute("data-processed");
Copy link
Collaborator Author

@Coalery Coalery Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최초 호출되는 mermaid.run()에 의해 'data-processed' attribute가 mermaid element에 생성이 되어, 이후 mermaid.run()을 재호출해도 렌더링되지 않는 문제가 있습니다. 관련 코드

이를 해결하기 위해 'data-processed' attribute를 제거합니다.

ref:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

canvas용 별도 css 파일로 분리합니다. (canvas.css)

@cpprhtn
Copy link
Owner

cpprhtn commented Aug 15, 2024

LGTM 👍

@cpprhtn cpprhtn merged commit 87d5092 into main Aug 15, 2024
@Coalery Coalery deleted the feat/create-node branch August 16, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants