Code Monkey home page Code Monkey logo

Comments (12)

MattyBalaam avatar MattyBalaam commented on June 30, 2024 1

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.

MattyBalaam avatar MattyBalaam commented on June 30, 2024 1

I gave the PR a try and it works great on my mousewheel. Very nice work.

from react-easy-crop.

MattyBalaam avatar MattyBalaam commented on June 30, 2024 1

Ah, yes. you shouldn’t rely on me as a tester that’s for sure.

from react-easy-crop.

ValentinH avatar ValentinH commented on June 30, 2024 1

No I think it's ready: https://codesandbox.io/s/mj61vp82xp.

It also handles mobile zoom too. :)

from react-easy-crop.

MattyBalaam avatar MattyBalaam commented on June 30, 2024 1

Just tried it on desktop and on my Android phone and it works brilliantly. Brilliant job.

from react-easy-crop.

ValentinH avatar ValentinH commented on June 30, 2024

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.

ValentinH avatar ValentinH commented on June 30, 2024

I'll try to look into this when I have a bit of time 🙂

from react-easy-crop.

ValentinH avatar ValentinH commented on June 30, 2024

@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.

ValentinH avatar ValentinH commented on June 30, 2024

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.

ValentinH avatar ValentinH commented on June 30, 2024

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.

ValentinH avatar ValentinH commented on June 30, 2024

Ok I'll release this later today once I'm on the computer :)

from react-easy-crop.

ValentinH avatar ValentinH commented on June 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.