andrefarzat / ng-jcrop

Angular directive to jCrop jQuery plugin
GNU General Public License v2.0
101 stars 39 forks source link

Input url #58

Closed andrefarzat closed 7 years ago

andrefarzat commented 8 years ago

@kelkes + @jlstr I am pinging both of you for this PR is related to issue https://github.com/andrefarzat/ng-jcrop/issues/52

I added the "Add by url" in the demo page as an example in how we could choose an image via url using input[type="url"]. As first attempt I added a blur event to that input and call the $rootScope.$broadcast('JcropChangeSrc'); with the input's value. It worked fine in my tests, however, there is the case that the url is invalid or the image isn't a 200 ... Dunno how we could treat this error.

To test this PR, use the npm start command to start the server locally

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-78.8%) to 19.048% when pulling e87fb1add7d63b4b4ddf68ec3c5ed2a0132ebe65 on input-url into 699b4c5eab53b18f5ae650dc67a6071a012fa7d5 on master.

jlstr commented 8 years ago

@andrefarzat Thank you very much. I have not been very responsive because I actually had to use a different plugin. I appreciate the mention though. Thank you once again!

andrefarzat commented 8 years ago

no problems, @jlstr. Mark to unwatch to avoid the noise 😸

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.1%) to 97.959% when pulling dcf781ec8d7016d9b628b5e6cf7771b420568801 on input-url into 699b4c5eab53b18f5ae650dc67a6071a012fa7d5 on master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.1%) to 97.959% when pulling dcf781ec8d7016d9b628b5e6cf7771b420568801 on input-url into 699b4c5eab53b18f5ae650dc67a6071a012fa7d5 on master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 97.959% when pulling 3d989bddada714e2b45d2f0161f9c037acd845bf on input-url into c2764ea93f3f22587acf39cda179f9598c8f3694 on master.