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: User Experience Optimization Code Merge about Drawing #143

Merged
merged 15 commits into from
Dec 5, 2024

Conversation

dbjoung
Copy link
Collaborator

@dbjoung dbjoung commented Nov 27, 2024

πŸ“‚ μž‘μ—… λ‚΄μš©

closes #78

  • μ»€μ„œ 보정 μ½”λ“œ 병합
  • λ“œλ‘œμž‰ 보간법 적용 -> μ΅œμ ν™” ν•„μš”. 미적용
  • flood fill λ‚΄λΆ€ 둜직 λ³€κ²½
  • λ‘₯κ·Ό μ„  μ˜΅μ…˜ 적용

πŸ’‘ μžμ„Έν•œ μ„€λͺ…

μ»€μ„œ 보정 μ½”λ“œ 병합

  • μΊ”λ²„μŠ€ μ»€μ„œμš© canvas Element μΆ”κ°€
  • μ»€μ„œμ™€ λ“œλ‘œμž‰μ΄ ν•¨κ»˜ 움직이도둝 보정

λ“œλ‘œμž‰ 보간법 적용

  • μ„  λ¦¬λ Œλ”λ§ 없이 κ³‘μ„ μœΌλ‘œ 그렀지도둝 보간법 적용
  • drawStroke와 μ—°κ²°λœ λ©”μ†Œλ“œλ“€μ— μ™„μ„±λœ μ„  ꡬ뢄을 μœ„ν•œ isLastStroke 인자 μΆ”κ°€
  • redraw μƒν™©μ—μ„œλŠ” μ•„λž˜ μ½”λ“œμ—μ„œ μ™„μ„±λœ 선인지 μ•„λ‹Œ 지 μž„μ‹œλ‘œ ꡬ뢄
notNoneStrokes.forEach(({ stroke }, idx) => {
  const points = stroke.points;
  if (notNoneStrokes.length - 1 === idx) drawStroke(stroke, true);
  else if (points.length >= notNoneStrokes[idx + 1].stroke.points.length) drawStroke(stroke, true);
  else drawStroke(stroke, false);
});

flood fill κ΄€λ ¨ 둜직 λ³€κ²½

  • λ°©λ¬Έ λ°°μ—΄ μ‚¬μš©ν•˜λŠ” λ°©ν–₯으둜 λ‚΄λΆ€ 둜직 λ³€κ²½
  • 둜컬 νŽ˜μΈνŒ…μ€ drawStroke둜 이어지지 μ•Šλ„λ‘ μˆ˜μ •

λ‘₯κ·Ό μ„  μ˜΅μ…˜ 적용

  • 선을 λ‘₯κΈ€κ²Œ λ§Œλ“œλŠ” μ˜΅μ…˜μΈ μ•„λž˜ 두 μ½”λ“œ μΆ”κ°€
ctx.lineCap = 'round';
ctx.lineJoin = 'round';

πŸ“— μ°Έκ³  자료 & κ΅¬ν˜„ κ²°κ³Ό (선택)

improvementAboutDrawing

βœ… μ…€ν”„ 체크리슀트

  • PR 제λͺ©μ„ ν˜•μ‹μ— 맞게 μž‘μ„±ν–ˆλ‚˜μš”?
  • 브랜치 μ „λž΅μ— λ§žλŠ” λΈŒλžœμΉ˜μ— PR을 올리고 μžˆλ‚˜μš”? (main이 μ•„λ‹™λ‹ˆλ‹€.)
  • Reviewers, Labelsλ₯Ό λ“±λ‘ν–ˆλ‚˜μš”?
  • λΆˆν•„μš”ν•œ μ½”λ“œλŠ” μ œκ±°ν–ˆλ‚˜μš”?

@dbjoung dbjoung added ✨ Feature New feature or request πŸ’» FE Frontend Code labels Nov 27, 2024
@dbjoung dbjoung added this to the Week 5 milestone Nov 27, 2024
@dbjoung dbjoung self-assigned this Nov 27, 2024
@dbjoung dbjoung linked an issue Nov 27, 2024 that may be closed by this pull request
4 tasks
Copy link
Contributor

πŸ“š Storybook preview deployed to: Visit Storybook Preview

Copy link
Contributor

πŸ“š Storybook preview deployed to: Visit Storybook Preview

Copy link
Contributor

πŸ“š Storybook preview deployed to: Visit Storybook Preview

@ssum1ra ssum1ra force-pushed the develop branch 2 times, most recently from a06a62d to b95447a Compare December 2, 2024 05:08
Copy link
Contributor

github-actions bot commented Dec 5, 2024

πŸ“š Storybook preview deployed to: Visit Storybook Preview

Copy link
Contributor

github-actions bot commented Dec 5, 2024

πŸ“š Storybook preview deployed to: Visit Storybook Preview

@dbjoung dbjoung merged commit 8b24e38 into develop Dec 5, 2024
2 checks passed
Copy link
Contributor

github-actions bot commented Dec 5, 2024

🧹 Storybook preview for PR #143 has been removed.

github-actions bot added a commit that referenced this pull request Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
πŸ’» FE Frontend Code ✨ Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

μΊ”λ²„μŠ€ μ΅œμ ν™” μž‘μ—… 병합
3 participants