ionic-team / ng-cordova

OBSOLETE: Please move to Ionic Native https://github.com/ionic-team/ionic-native
https://github.com/ionic-team/ionic-native
MIT License
3.48k stars 1.05k forks source link

camera doesn't support cameraPopoverOptions on iOS #436

Open mobidev111 opened 9 years ago

mobidev111 commented 9 years ago

The ng-cordova implementation doesn't offer a handle for the popover options: https://github.com/apache/cordova-plugin-camera/blob/master/doc/index.md#example-2

 var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
     { destinationType: Camera.DestinationType.FILE_URI,
       sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
       popoverOptions: new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY)
     });

 // Reposition the popover if the orientation changes.
 window.onorientationchange = function() {
     var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
     cameraPopoverHandle.setPosition(cameraPopoverOptions);
 }
pbernasconi commented 9 years ago

@mobidev111 You're right, and this should be an option. I don't want to break the current way of taking a picture, so maybe a new method with $cordovaCamera.getPictureWithPopover() would work?

mobidev111 commented 9 years ago

ok, that would do.