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

Fix distance snap grid circles not correctly being centred on snap point #23938

Merged
merged 5 commits into from
Jun 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ protected override void CreateContent()
for (int i = 0; i < requiredCircles; i++)
{
float diameter = (offset + (i + 1) * DistanceBetweenTicks) * 2;
const float thickness = 4;

AddInternal(new Ring(ReferenceObject, GetColourForIndexFromPlacement(i))
{
Position = StartPosition,
Origin = Anchor.Centre,
Size = new Vector2(diameter),
InnerRadius = 4 * 1f / diameter,
Size = new Vector2(diameter + thickness / 2),
InnerRadius = thickness * 1f / diameter,
bdach marked this conversation as resolved.
Show resolved Hide resolved
});
}
}
Expand Down