Closed ducthang310 closed 7 years ago
hello @ducthang310 , you can see in the demo (http://andrefarzat.github.io/ng-jcrop/) that we have several instances running side by side. It's possible to name a configuration to each case, therefore, you can have these instances behaving individually.
The directive which does that is ng-jcrop-config-name="configName"
. Please, have a look in the README.md.
Hope it helped 😄
Hi Andrefarzat, This issue is still occur when I use ng-jcrop-config-name with different configName, "$rootScope.$broadcast" is reason for all Upload inputs are changed. The demo (http://andrefarzat.github.io/ng-jcrop/) has only one Upload input. If you have multi Upload input, you'll see the error.
Thank you for your help!
@ducthang310 true. I haven't checked that there are two upload inputs. Will implement it in the demo page, so I can see it happening here 😃
@ducthang310 the demo now is updated with a functional example: http://andrefarzat.github.io/ng-jcrop/
I add two upload inputs on the same page and got an error:
This error is made by below code:
"$rootScope.$broadcast" is reason for all upload inputs are changed. And currently, I have changed the code to: $scope.$broadcast
It's good for me. And I hope it's fine with you. If this solution is not correct (has some potential bugs). Please help me to check it or fix it. Thank you so much! p/s: My english is so bad, I'm so sorry for that :-D