Code Monkey home page Code Monkey logo

react-native-view-editor's People

Contributors

gevgasparyan avatar gevorg15 avatar gtg092x avatar slavikmanukyan avatar sscaff1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

react-native-view-editor's Issues

Cannot read property 'number' of undefined

Error: Requiring module "node_modules/react-native-view-editor/index.js", which threw an exception: TypeError: Cannot read property 'number' of undefined

I use react-native 0.55.0

Anyone have same problem?

How to capture the image?

Hi, first of all, your library it's pretty cool. Second, I'm trying to use it in a small project and I'm wondering how can I capture the image and get resulting image.

Does not zoom to centre of touches

When zooming I was expecting it to zoom to the point where I am pinch zooming. But it zooms to the images 0,0. Looking at the code I see the bit of code in handlePanResponderMove is commented out. Uncommenting this bit of code still does not make it work. I have spent quite a bit of time trying to get this to work without success. Any ideas anyone?

How to enable free dragging?

Hello, Nice Work!
In my project I need to enable free dragging when the object is equal to minScale. What code is responsible for positioning the object at the edges?
Thanks

Question about image sizes

Hi!

I'm trying to pan and zoom big image (1000x1000). So I set imageWidth & imageHeight to 1000 and imageContainer sizes to the Dimensions values. It pans ok, but pinch-zooming is funky. on iOs it just pans and does not zoom, on Android it crops the image to the container size.

Could you please advise if I'm doing anything wrong?

Thanks,
A.

Image overflow

Hi I tried your example from medium post and my images are overflowing Mask.
screenshot_20170130-201907

Another question is imageHeight and imageWidth props are supposed to be the final image size? Because maybe there is something with this props

Posting is off

Anyone want to take a hack at the ViewEditor and try to get the correct dimensions for the offset. It’s the one thing preventing us from getting proper image cropping working

offset: {
        x: (imageWidth - scale * imageWidth) / 2 + pan.x - subWidth,
        y: (imageHeight - scale * imageHeight) / 2 + pan.y - subHeight,
      },

So here is what works currently works:

  1. if you have the original image and try to post, the code as is works
  2. if you have the image zoomed in all the way the following code works
offset: {
        x: (imageWidth - scale * imageWidth) / 2 - pan.x - subWidth,
        y: (imageHeight - scale * imageHeight) / 2 - pan.y - subHeight,
      },

Notice all I did was change the sign on pan from positive to negative. Everything else does not work (you’ll get some black space in your cropped image. Any help is greatly appreciated. I’ve been looking at this all day and can’t figure out what factor is missing

2019 working SimpleViewEditor.js

Hi,
I had problems running that code on RN 0.58.6, only single touch on Modal view, some execution warning / errors ...

Attached is my final and working SimpleViewEditor.js

SimpleViewEditor.txt

@justhive, many thanks for that code, it is an excellent starting point for what I need to do.

I'm now centering scale & rotation ... to be continued

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.