Closed AnindyoChoudhury closed 8 years ago
Hi @AnindyoChoudhury, if you check the dummy app it should be clear how to do that. I am closing this issue now as it is not an issue but rather a question how to do it. If you still have the issue I can help you by email as I have more time now.
Hey I'm having the same problem and I don't know how to fix it. I'm looking at the dummy app and it is not apparent.
@mpc20001 what is the issue? You just need to upload an image file using any method that works for you, to be able to grab the image. I used https://github.com/thefrontside/emberx-file-input to upload the images, then used the result in this cropper.
@rwwagner90 I was able to grab an image and crop it, but then I was not able to load another image into the cropper. I figured a workaround and hopefully this helps anyone else who gets stuck. I had to remove the cropper component from the template and then recreate it to get it to load a new image. What would be great would be if there was a simple function or method to call on it to reset it or load a new image.
@mpc20001 I think we may have had the same problem, and there was some extra code in an issue or PR somewhere in the comments that fixed it for us, but I can't seem to find it. Also, looking at the code for the component here, it uses didRender
, but we could probably wrap it in didReceiveAttrs
which would cause it to fire every time something changed. If you feel comfortable diving in and playing with that, I would gladly accept a PR and I'm happy to help out where I can 😄
sure. I'll dig in when I have some time! Thanks. @rwwagner90
Hello again, Hey the image cropping is working very well. But i am having difficulty to upload different images to be cropped; ie. I need to upload an image from the local system and then crop it. the code I an using is as follows.
the hbs file
and the corresponding js file is
but the image is not changing. can you please help out with how to upload an image to a website from a client image and then crop it.