Comments (12)
I started to take a crack earlier, but it may take a while for me to find the time to implement it well.
from react-easy-crop.
I gave the PR a try and it works great on my mousewheel. Very nice work.
from react-easy-crop.
Ah, yes. you shouldn’t rely on me as a tester that’s for sure.
from react-easy-crop.
No I think it's ready: https://codesandbox.io/s/mj61vp82xp.
It also handles mobile zoom too. :)
from react-easy-crop.
Just tried it on desktop and on my Android phone and it works brilliantly. Brilliant job.
from react-easy-crop.
You are right, this would be nice. In the same idea, when zooming on mobile with 2 fingers, we should also use the center of the 2 points as the zoom origin.
This is more complex to compute but it's still doable. Would you like to implement this?
from react-easy-crop.
I'll try to look into this when I have a bit of time 🙂
from react-easy-crop.
@MattyBalaam Here's a first try, could you tell me if it matches what you meant? (only wheel is handled in this demo):
https://codesandbox.io/s/mj61vp82xp
from react-easy-crop.
OK, I'll need to clean the code a bit and at least ensure that the zoom with pinch is still working. I could add the same feature for pinch later. 🙂
from react-easy-crop.
Actually, I just noticed that my PR works well if you didn't move the image before. If you moved it, then it's not working perfectly. I guess the crop position should be taken in to account as well.
from react-easy-crop.
Ok I'll release this later today once I'm on the computer :)
from react-easy-crop.
Released as v1.4.0: https://github.com/ricardo-ch/react-easy-crop/releases/tag/v1.4.0
from react-easy-crop.
Related Issues (20)
- Crop Area incorrectly sized for objectFit='cover' HOT 4
- Scrollwheel zoom does not work properly with restrictPosition=false HOT 8
- Question: Cropper 100% width and/or 100% Height HOT 7
- Cannot use import statement outside a module HOT 26
- Cropped image area changes when we zoom in the image , even when cropSize is given HOT 1
- Crop area does not take up the full height/width of the image HOT 6
- Frames are lost on cropping a GIF HOT 3
- There is a bug in setting restrictPosition = true HOT 2
- Allow padding to the crop area HOT 5
- Triggers unwanted blob request when using local files for cropping HOT 2
- Multiple Crop Areas HOT 1
- Can this library crop images with custom aspects / resizable cropper? HOT 1
- How can i add Any Text and crop the image with Text. HOT 1
- How to make the crop pan to always fit the height and width on the image. HOT 17
- Black background when cropping image
- 'Cropper' cannot be used as a JSX component. HOT 1
- Update depreciated packages ! HOT 2
- On Safari, images tend to be blurry when zoomed in in the preview HOT 2
- Square image in ios HOT 2
- JSX element class does not support attributes because it does not have a 'props' property. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-easy-crop.