fengyuanchen / cropperjs

JavaScript image cropper.
https://fengyuanchen.github.io/cropperjs/
MIT License
13.15k stars 2.42k forks source link

feat(cropper-selection): aspectRatio reactivity #1163

Closed NamesMT closed 4 months ago

NamesMT commented 7 months ago

Reopen of #1161

Resolves #1124

Summary

What kind of change does this PR introduce? (check at least one)

If changing the UI of the default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one) Maybe?, theorically if user allowed input to change the aspect-ratio multiple times before commiting an action, then previously the width/height is only recalculated once, but because it is now reactive, the width/height would recalculated and grow multiple times.

1164 would improve the UX on this part where the selection area would not grow too much.

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

You have tested in the following browsers: (Providing a detailed version will be better.) Tested with playground

If adding a new feature, the PR's description includes:

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information: