Skip to content

Crop by X and Y Coordinates#192

Merged
colbyfayock merged 2 commits intomainfrom
feat/crop-xy
Sep 3, 2024
Merged

Crop by X and Y Coordinates#192
colbyfayock merged 2 commits intomainfrom
feat/crop-xy

Conversation

@colbyfayock
Copy link
Collaborator

Description

Adds the x and y coordinate options to the crop plugin to allow for coordinates based crops.

width: 123,
height: 321,
crop: {
  type: 'crop',
  x: 123
  y: 321
}

Issue Ticket Number

cloudinary-community/next-cloudinary#481

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Fix or improve the documentation
  • This change requires a documentation update

Checklist

  • I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
  • I have created an issue ticket for this PR
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have run tests locally to ensure they all pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation

@colbyfayock colbyfayock merged commit 091b73d into main Sep 3, 2024
@colbyfayock colbyfayock deleted the feat/crop-xy branch September 3, 2024 20:57
github-actions bot pushed a commit that referenced this pull request Sep 3, 2024
@github-actions
Copy link

github-actions bot commented Sep 3, 2024

🎉 This PR is included in version @cloudinary-util/url-loader-v5.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

colbyfayock added a commit to cloudinary-community/next-cloudinary that referenced this pull request Sep 4, 2024
# Description

Updates URL Loader to bring in changes to support coordinates based
cropping:
cloudinary-community/cloudinary-util#192

It exposes the `x` and `y` property on the `crop` object:

```
crop={{
  type: 'crop',
  width: 400,
  height: 400,
  x: 80,
  y: 350,
  gravity: 'north_east',
  source: true
}}
```

Allowing someone to crop to a specific location.

## Issue Ticket Number

Fixes #507 
Fixes #481

<!-- Specify above which issue this fixes by referencing the issue
number (`#<ISSUE_NUMBER>`) or issue URL. -->
<!-- Example: Fixes
https://github.com/cloudinary-community/next-cloudinary/issues/<ISSUE_NUMBER>
-->

## Type of change

<!-- Please select all options that are applicable. -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Fix or improve the documentation
- [ ] This change requires a documentation update


# Checklist

<!-- These must all be followed and checked. -->

- [ ] I have followed the contributing guidelines of this project as
mentioned in [CONTRIBUTING.md](/CONTRIBUTING.md)
- [ ] I have created an
[issue](https://github.com/cloudinary-community/next-cloudinary/issues)
ticket for this PR
- [ ] I have checked to ensure there aren't other open [Pull
Requests](https://github.com/cloudinary-community/next-cloudinary/pulls)
for the same update/change?
- [ ] I have performed a self-review of my own code
- [ ] I have run tests locally to ensure they all pass
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes needed to the documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant