-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
add kwarg to rotate Toggle #4471
base: master
Are you sure you want to change the base?
Conversation
1b5999b
to
fde35a9
Compare
7039342
to
9ef4860
Compare
src/makielayout/blocks/toggle.jl
Outdated
R = Makie.rotationmatrix_z(angle_rad) | ||
T = Makie.translationmatrix(-center) | ||
Tinv = Makie.translationmatrix(center) | ||
topscene.transformation.model[] = Tinv * R * T |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably makes sense to wait for #4472 and replace this with
R = Makie.rotationmatrix_z(angle_rad) | |
T = Makie.translationmatrix(-center) | |
Tinv = Makie.translationmatrix(center) | |
topscene.transformation.model[] = Tinv * R * T | |
translate_origin!(topscene, center) | |
rotate!(topscene, angle_rad) |
once its merged.
d29d9ad
to
c2394c9
Compare
i've fixed the alignment issue in the previous comment by refactoring to do my own rotation instead of using @ffreyer 's method. i couldn't figure out another way to do it. everything seems to work, and i suspect tests will pass, but only because none of the reference images uses the there is a slight backwards incompatibility that might warrant a bump in Makie's minor version with this PR as the size of the toggle is now controlled by |
i'm confused about the CI failure for ref img "Button - Slider - Toggle - Textbox":
it works fine locally and nothing in this PR should effect that test. |
Description
fixes #4378; supersedes #4445.
adds
orientation
kwarg toToggle
that specifies the angle in radians to rotate the toggle. default of 0 is horizontal with active being to the right.Type of change
Checklist