Skip to content

fix: flatten slur if distance is too large#279

Merged
yinanazhou merged 1 commit intodevelopfrom
relation-render
Apr 17, 2025
Merged

fix: flatten slur if distance is too large#279
yinanazhou merged 1 commit intodevelopfrom
relation-render

Conversation

@yinanazhou
Copy link
Copy Markdown
Collaborator

  • Added condition when the horizontal distance is more than 2000
  • Used two control points for this condition

refs: #271

before:

image

after:

image

- Added condition when the horizontal distance is more than 2000
- Used two control points for this condition

refs: #271
@yinanazhou yinanazhou requested a review from yrammos April 16, 2025 22:04
@yrammos
Copy link
Copy Markdown
Member

yrammos commented Apr 17, 2025

@yinanazhou I tried this on a few scores and it seems to work, visually. Thanks!

If I understand correctly, you rely on pixel distances in your algorithm. Are these distances independent of zoom level? If they are, then please go ahead and merge the PR—it looks good. If not, we need to adjust the algorithm so that its decision to flatten is independent of the current zoom level.

@yinanazhou
Copy link
Copy Markdown
Collaborator Author

@yrammos the width is calculated using SVG coordinate system, whereas zoom uses CSS transforms. The zoom level will not affect the calculation of the width.

@yrammos
Copy link
Copy Markdown
Member

yrammos commented Apr 17, 2025

Excellent. Then we can merge this in, @yinanazhou.

There are some potential adjustments to discuss, but they would be separate PRs.

@yinanazhou yinanazhou merged commit 0cae4f0 into develop Apr 17, 2025
@yinanazhou yinanazhou deleted the relation-render branch April 24, 2025 19:00
@yrammos yrammos restored the relation-render branch July 2, 2025 10:54
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