Skip to content

fix clamp sizing for long stacks#4700

Closed
walterbender wants to merge 3 commits intomasterfrom
connections
Closed

fix clamp sizing for long stacks#4700
walterbender wants to merge 3 commits intomasterfrom
connections

Conversation

@walterbender
Copy link
Member

We have had a long-standing issue with the calculation of the clamp size. When you have a long stack inside of a clamp, you will notice that the clamp is not quite large enough. It is a 0.25 pixel adjustment (at standard scale) per clamp slot to fix the issue.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Member Author

Before:
Screenshot From 2025-06-05 09-08-54

After:
Screenshot From 2025-06-05 09-08-21

@walterbender
Copy link
Member Author

@pikurasa could you please test?

@pikurasa
Copy link
Collaborator

pikurasa commented Jun 5, 2025

It works, and some things look better.

I did notice that at the end of a string of notes, it looks like this in your branch:

Screenshot from 2025-06-05 10-17-46

For reference, this is master:

Screenshot from 2025-06-05 10-18-52

So, in this case, it seems to overcompensate.

@walterbender
Copy link
Member Author

Thx. How many notes were in the clamp?

@pikurasa
Copy link
Collaborator

pikurasa commented Jun 5, 2025

Thx. How many notes were in the clamp?

There were eight.

It seems like it does up to three notes the best. After that, it begins to drift.

@walterbender
Copy link
Member Author

hmm. digging deeper, I think the issue is a bit different than I thought. It seems that the mis-sizing of the clamp is only an issue when the block scale is 1.5 (the default size). All the other sizes are integers. So what happens is that the block positions are calculated to .5 pixel precision but are being rendered at full pixel positions. I need to think about a solution.

@walterbender
Copy link
Member Author

Screenshot From 2025-06-05 19-31-03

@pikurasa It is not perfect but I think it is better than before.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2025

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Member Author

I think the only way to fix this properly is to ensure that all block sizes, when multiplied by 1.5, are still integers. So all block sizes must be even numbers.

@walterbender
Copy link
Member Author

I am going to take a different approach to this.

@walterbender walterbender deleted the connections branch February 13, 2026 20:24
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