Opened 9 years ago
Closed 9 years ago
#34851 closed defect (bug) (fixed)
Flex Sizes In WP_Customize_Cropped_Image_Control Not Working
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 4.3.1 |
Component: | Customize | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
Doesn't appear that the "flex_width" or "flex_height" are working when set to true. Anyone else having this problem?
Attachments (2)
Change History (12)
#1
in reply to:
↑ description
@
9 years ago
#2
@
9 years ago
I'm seeing this in 4.4.1 as well. It looks like this is happening because when the script submits the parameters for executing the crop, it sets the destination file dimensions to be whatever the "suggested" width and height are in the Customizer's control definition.
cropDetails.dst_width = control.params.width; cropDetails.dst_height = control.params.height;
Changing dst_width
and dst_height
to equal the normal width
and height
values in the cropDetails object appears to fix the problem, because then the destination file has the same dimensions as the area selected for the crop. That may not always be the desired outcome, if the cropped file is expected to have a min/max dimension limit, but in that case, it seems like there should probably be other parameters for the WP_Customize_Cropped_Image_Control
to specify this behavior.
#4
in reply to:
↑ 3
@
9 years ago
Replying to coreymckrill4ttf:
Sweet, good catch.
Code example tried with the twentyfifteen, just in cast I'm missing something.