This merges upstream changes to the crop editor, making it actually usable.
Previously, the only way to edit a crop boundary was to specify it manually in the crop editor toolbar. With these changes, however, you can use mouse input to recreate and reposition the boundary.
In addition, a bug in computing the initial crop boundary for portrait photos has been fixed.
Before (master):
After (this PR):
This merges upstream changes to the crop editor, making it actually usable.
Previously, the only way to edit a crop boundary was to specify it manually in the crop editor toolbar. With these changes, however, you can use mouse input to recreate and reposition the boundary.
In addition, a bug in computing the initial crop boundary for portrait photos has been fixed.
Before (master):

After (this PR):

Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This merges upstream changes to the crop editor, making it actually usable.
Previously, the only way to edit a crop boundary was to specify it manually in the crop editor toolbar. With these changes, however, you can use mouse input to recreate and reposition the boundary.
In addition, a bug in computing the initial crop boundary for portrait photos has been fixed.
Before (master):

After (this PR):

@@ -118,1 +118,4 @@// Does the thumbnail exist on disk? If not, use an url to generate it.if (!$filename || !file_exists(THUMBSDIR . '/' . $subdir . '/' . $filename))$thumb_url = BASEURL . '/thumbnail/' . $image->getId() . '/' . $thumb['width'] . 'x' . $thumb['height'] . $thumb['suffix'] . '/';Edge case:
suffixcan be null, as the group is optional in the regex. Handle this.@@ -148,2 +155,4 @@$custom_key = 'custom_' . $data->thumb_width . 'x' . $data->thumb_height;if (isset($meta[$custom_key])){// TODO: delete from diskIs this still needed?
It ought to be done, but I'd like to refactor thumbnail file management in general so this kind of thing is not left to the individual controllers.
@@ -217,0 +209,4 @@option.dataset.crop_region = data.value;option.textContent = option.textContent.replace(/top|bottom|centre|slice/, "exact");// TODO: update metaIs this needed for this PR?
Thanks. No, this just still hasn't been implemented; it wasn't before, either. I'd like to refactor the form a little before I take this on.