Closed stanleygomes closed 9 years ago
That's not a stupid question at all, my friend. And unfortunately, the ngJcrop was designed to work with only one configuration per app ( my bad on that =F ).
Do you think it would be a good addition ? Something like
<script>
// This code in a file
app.controller('SomeController', function($scope){
$scope.obj = {}
// The url or the data64 for the image
$scope.obj.src = 'beautifulImage.jpg';
// The config which will overwritten the Default Config
$scope.obj.config = { aspectRatio: 'your ratio here' };
// Must be [x, y, x2, y2, w, h]
$scope.obj.coords = [100, 100, 200, 200, 100, 100];
// You can add a thumbnail if you want
$scope.obj.thumbnail = true;
});
</script>
<div ng-jcrop="obj.src" ng-jcrop-config="obj.config" selection="obj.coords" thumbnail="obj.thumbnail"></div>
If you think we should implement it, please re-open this issue. p.s.: Não vi nenhum problema no teu inglês :smiley_cat:
Hello,
I used multiple ng-app to manipulate different configurations.
If the community needs this feature, You may implement it, but it's no so essencial.
Thanks.
hey, my friend, I also face this problem, and it is different for me to use multiple ng-app to manage different config, so this feature is very import for me, can you implement it. I am very appreciate it. :)
Hello My friend,
i use the jCrop in my angular app and in multiple different controllers, for each one I need a different configuration, but I only found this config on my app.config:
ngJcropConfigProvider.setJcropConfig({
How can I do for example:
myapp.controller("controller1", ...{ //crop image square }
myapp.controller("controller2", ...{ //crop image panoramic }
myapp.controller("controller3", ...{ //crop image 16/9 }
etc.
Sorry for my english and if the question is stupid.
Thanks!