You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some crops with vertical aspect ratios, e.g. 9:16 instead of 16:9. We've noticed that the cropper tool in the CMS does not seem to load these crops correctly. Specifically, when these crops extend to cover the full height of the image, their x-position is not loaded correctly. Upon opening the cropper, it'll be reset to the default x-position.
We confirmed that this is the case both when repeatedly opening the cropper without refreshing the page, as well as when we first open the cropper after loading a resource to edit.
If the crop is downsized to cover less than the full height of the image, it works fine.
The crop appears to save correctly. We see the effect on the frontend and by looking at the cropped thumbnail in the CMS.
Full-width crops appear to be working fine.
I confirmed that the issue is not affecting crops that have horizontal aspect ratios that are smaller than the aspect ratio of the image (e.g. 4:3 crop on a 16:9 image). So it's not just about the crop being full-height, it has to be a vertical aspect ratio, too.
Steps to reproduce
Create a model with the following media definition:
attempting to fix#1194
which seems to be an issue with cropper.js
(fengyuanchen/cropperjs#1057)
and ultimately is likely caused by rounding errors
It seems setting individual crop settings instead
of attempting to set them all in one go fixes it,
at least within Twill
attempting to fix#1194
which seems to be an issue with cropper.js
(fengyuanchen/cropperjs#1057)
and ultimately is likely caused by rounding errors
It seems setting individual crop settings instead
of attempting to set them all in one go fixes it,
at least within Twill
Description
We have some crops with vertical aspect ratios, e.g. 9:16 instead of 16:9. We've noticed that the cropper tool in the CMS does not seem to load these crops correctly. Specifically, when these crops extend to cover the full height of the image, their x-position is not loaded correctly. Upon opening the cropper, it'll be reset to the default x-position.
We confirmed that this is the case both when repeatedly opening the cropper without refreshing the page, as well as when we first open the cropper after loading a resource to edit.
If the crop is downsized to cover less than the full height of the image, it works fine.
The crop appears to save correctly. We see the effect on the frontend and by looking at the cropped thumbnail in the CMS.
Full-width crops appear to be working fine.
I confirmed that the issue is not affecting crops that have horizontal aspect ratios that are smaller than the aspect ratio of the image (e.g. 4:3 crop on a 16:9 image). So it's not just about the crop being full-height, it has to be a vertical aspect ratio, too.
Steps to reproduce
@formField('medias')
field.Alternatively, instead of step 8:
Here's a video of the issue:
https://drive.google.com/file/d/1e8WyF8TI7vjzq8cDQiZDPwGTkG0vWtpI/view?usp=sharing
(You may need to download it, Google Drive has a hard time with video previews.)
Expected result
Full-height vertical crops load correctly.
Actual result
As described above.
Versions
Twill: 2.4.0
Laravel: 6.20.34
PHP: 7.2
DB: Postgres 13
The text was updated successfully, but these errors were encountered: