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

[v7.0.2] Crop can move on resize and goes beyond boundaries. #261

Closed
de83c78d1f opened this issue May 21, 2019 · 11 comments
Closed

[v7.0.2] Crop can move on resize and goes beyond boundaries. #261

de83c78d1f opened this issue May 21, 2019 · 11 comments

Comments

@de83c78d1f
Copy link

Hello, there is issue when u have min dimensions. Assume we have crop component with minWidth/minHeight 160/90px (add those props to ReactCrop component). If you drag your crop to bottom of canvas leaving some space to enlarge crop to bottom. Then drag bottom-left corner to the bottom edge of the canvas and keep dragging.

  1. crop moves to the left.
  2. crop can move beyond left edge of the canvas.
    It is reproducible in demo.
    Although checking on crop x position in onCropChange is an option - there's still an issue 1 - crop kinda shouldn't move while user attempts to resize.
    Gif
sekoyo pushed a commit that referenced this issue May 21, 2019
sekoyo pushed a commit that referenced this issue May 21, 2019
@sekoyo
Copy link
Owner

sekoyo commented May 21, 2019

Hi thanks for the clear bug report 👍 Please try 7.0.3

@sekoyo
Copy link
Owner

sekoyo commented May 23, 2019

@de83c78d1f any luck?

@de83c78d1f
Copy link
Author

Thank you for fast response/fix. Yeah, new version actually fixes the bug mentioned above.
But... Introduces another, which is kinda mirrored version.
Peek 2019-05-24 11-29

@sekoyo
Copy link
Owner

sekoyo commented May 24, 2019

Ah good catch thanks for checking will take a look soon

@sekoyo
Copy link
Owner

sekoyo commented Jun 4, 2019

@de83c78d1f Finally getting round to look at this, can you try with this sandbox https://codesandbox.io/s/reactimagecrop-issue-261-qq72y or else spot if I'm doing something wrong?:

I have set same min/max as you and 16/9 aspect, but crop isn't growing on the other side:

ezgif-1-78ab8b76ab91

I can see from your screen you're on the same version so I'm guessing I'm doing something wrong in replicating it.

@sekoyo
Copy link
Owner

sekoyo commented Jun 4, 2019

Edit: ignore, I can reproduce some of the time

@sekoyo sekoyo closed this as completed in 959e1ad Jun 4, 2019
@sekoyo sekoyo reopened this Jun 4, 2019
sekoyo pushed a commit that referenced this issue Jun 5, 2019
sekoyo pushed a commit that referenced this issue Jun 5, 2019
@sekoyo
Copy link
Owner

sekoyo commented Jun 5, 2019

This should be fixed in #7.0.5 now

sekoyo added a commit that referenced this issue Jun 5, 2019
* Allow crop to be interchangeable pixels or percentage

* Upgrade build tooling to webpack 4, babel 7

* Add doc on unit

* Bugfixes of v8 functionality

* Fix a couple of points in README

* Fix x/y position when drawing a new crop

* Internal change: change resolveCrop to also only accept image dimensions

* Fix onComplete  hash link

* Fix issue #261

* Run build

* Run build

* Render both px or pc (dont convert pc to px for render)

* Build v8
@de83c78d1f
Copy link
Author

Hi, all fixes are irrelevant after version 8. Library does not respect boundaries anymore. Nor it respects min dimensions.
Peek 2019-06-25 15-55

@de83c78d1f
Copy link
Author

Ping

@sekoyo
Copy link
Owner

sekoyo commented Aug 28, 2019 via email

sekoyo added a commit that referenced this issue Oct 21, 2019
@sekoyo
Copy link
Owner

sekoyo commented Oct 21, 2019

Fixed in 8.4.0

@sekoyo sekoyo closed this as completed Oct 21, 2019
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

No branches or pull requests

2 participants