-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Post Featured Image: Don't display the scale control when the aspect ratio is original #48894
Conversation
Size Change: +12 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
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.
LGTM.
A minor thing - the conditional is quite hard to read now - maybe we want to abstract it to a function?
e4896f0
to
fda34ca
Compare
@scruffian |
Yes, looks great thanks. |
What?
This PR hides the scale control when the aspect-ratio setting of the Post Featured Image block is "Original (
auto
)".Why?
When the block is first inserted, the
aspectRatio
is set toundefined
, so the scale control is not visible. However, if you change it to a value other than the original, and then again to the original, theauto
value will be set and the scale control will remain visible.eabdfffc5bc29b69c95d9c1f263d7de3.mp4
How?
When
aspectRatio
isauto
, the scale control is hidden. Or maybe it would be better to update toundefined
whenaspectRatio
is changed to "Original".Testing Instructions