koorgoo / ngCropper

AngularJS wrapper for https://github.com/fengyuanchen/cropper
107 stars 72 forks source link

Conflict with new ngOptions in Angular 1.4 #9

Closed demetriusnunes closed 9 years ago

demetriusnunes commented 9 years ago

Hi there,

After we updated to Angular 1.4, ngCropper stopped working due to a conflict with the new ngOptions in Angular 1.4.

A simple change to the directive scope definition to { scope: { options: '=ngCropperOptions' } } fixed the problem.

Would you fix that and release a Angular 1.4 compatible version? Thanks, awesome lib.

koorgoo commented 9 years ago

Due to some legacy code I still use 1.26 in production. Will change to support both angular versions soon. Thanks for reply @demetriusnunes

code-simian commented 9 years ago

I've also had some issues with making the options have any effect on the cropper.

The only options that seem to work right now for me are 'maximize' and 'aspectRatio'. Even in the demo, if I add more options they have no effect whatsoever. In our work project we are using Angular 1.3 and I see that the demo project is using Angular 1.2 and in both cases the options do not work.

EDIT: the options do work after all. There is a comment in your demo linking to https://github.com/fengyuanchen/cropper#options. Those option names are for the latest version of the jQuery cropper but the one that your project uses is an older version so there is some mismatch between what the linked documentation says and what ngCropper recognizes.

koorgoo commented 9 years ago

Fixed in https://github.com/koorgoo/ngCropper/commit/ff41008e5260ecd6245c2920a79e7073185b09bc.