Skip to content

Refactor(#217): 화이트보드-backspace로 그래픽 요소 지우기 구현 #226

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

Conversation

Byeonjin
Copy link
Collaborator

@Byeonjin Byeonjin commented Dec 7, 2023

작업 개요

화이트보드-backspace로 그래픽 요소 지우기 구현 close #217

작업 사항

  • backspace로 그래픽 요소 지우기 구현
  • keydown 이벤트의 경우 눌려있는 경우 계속 이벤트가 발생하기 때문에 keyup 이벤트로 변경
  • 언마운트시 이벤트 제거

고민한 점들(필수 X)

스크린샷(필수 X)

@Byeonjin Byeonjin added 🛠️ Refactor 리팩토링 작업 FE 프론트엔드 작업 labels Dec 7, 2023
@Byeonjin Byeonjin added this to the 5주차 milestone Dec 7, 2023
@Byeonjin Byeonjin self-assigned this Dec 7, 2023
Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for boarlog ready!

Name Link
🔨 Latest commit e9326eb
🔍 Latest deploy log https://app.netlify.com/sites/boarlog/deploys/657183b05d145a00089cc4b9
😎 Deploy Preview https://deploy-preview-226--boarlog.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Byeonjin Byeonjin marked this pull request as ready for review December 7, 2023 09:08
Copy link
Collaborator

@Jw705 Jw705 left a comment

Choose a reason for hiding this comment

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

고생 많으셨습니다 😊

@@ -68,7 +68,8 @@ const CanvasSection = () => {
window.addEventListener("resize", handleResize);

// delete 키를 이용해서 선택된 객체 삭제
const handleDelete = () => {
const handleDelete = ({ key, code }: { key: string; code: string }) => {
if (!(code === "Delete" || key === "Delete" || code === "Backspace" || key === "Backspace")) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

의견 반영해주셔서 감사합니다!

Copy link
Collaborator

Choose a reason for hiding this comment

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

헉,..! 의견 반영 감사합니다 :)

@@ -95,6 +92,7 @@ const CanvasSection = () => {
return () => {
newCanvas.dispose();
window.removeEventListener("resize", handleResize);
window.removeEventListener("keyup", handleDelete);
Copy link
Collaborator

Choose a reason for hiding this comment

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

이벤트 잊지 않고 제거해주는 것 좋습니다!

Copy link
Collaborator

@LellowMellow LellowMellow left a comment

Choose a reason for hiding this comment

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

LGTM입니다!! 로그인으로 많은 작업을 못해서... ㅠㅠㅠ 리뷰만 해드리는 것 같네요 죄송합니다 ㅠㅠ

@@ -68,7 +68,8 @@ const CanvasSection = () => {
window.addEventListener("resize", handleResize);

// delete 키를 이용해서 선택된 객체 삭제
const handleDelete = () => {
const handleDelete = ({ key, code }: { key: string; code: string }) => {
if (!(code === "Delete" || key === "Delete" || code === "Backspace" || key === "Backspace")) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

헉,..! 의견 반영 감사합니다 :)

@Byeonjin Byeonjin merged commit 89dd791 into boostcampwm2023:dev Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 작업 🛠️ Refactor 리팩토링 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor: 화이트보드-backspace로 그래픽 요소 지우기
3 participants