Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prop for height ration derived from calculated width of cropper container #739

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

martinadamec
Copy link

Summary

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

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

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

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

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

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

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

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

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

  • A convincing reason for adding this feature
  • [x ] Related documents have been updated
  • Related tests have been updated

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:
My use case, I have a placeholder for cropper, what has absolute position in percentages. v1.5.9 fit the cropper container to the width, bud height is not calculate properly and it is derived from the image. But I need keep same placeholder ratio without any dependency and size of viewport. So I add possibility to set this ratio and it works great. Usage is optional, of course.

@fengyuanchen
Copy link
Owner

I think this is a strange feature that might not need for most people. Thanks for your work, but I will not merge this at this moment.

@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2021

Codecov Report

Merging #739 (42d3e9e) into master (aec627f) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head 42d3e9e differs from pull request most recent head d707d11. Consider uploading reports for the commit d707d11 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #739      +/-   ##
==========================================
+ Coverage   72.63%   72.69%   +0.05%     
==========================================
  Files           9        9              
  Lines        1535     1538       +3     
==========================================
+ Hits         1115     1118       +3     
  Misses        420      420              
Impacted Files Coverage Δ
src/js/render.js 94.25% <100.00%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aec627f...d707d11. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants