Repository: cordova-plugin-camera Updated Branches: refs/heads/master fed798e6c -> 4e439d85c
CB-9070. (ios) Fixed CameraPopoverHandle documentation This closes #225 Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/4e439d85 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/4e439d85 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/4e439d85 Branch: refs/heads/master Commit: 4e439d85c326fef1c0fbcc3d7001c78325351ad6 Parents: fed798e Author: Julio César <jcesarmob...@gmail.com> Authored: Sun Jul 31 18:06:39 2016 +0200 Committer: Julio César <jcesarmob...@gmail.com> Committed: Sun Jul 31 18:20:50 2016 +0200 ---------------------------------------------------------------------- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/4e439d85/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 391b5cf..3f660e4 100644 --- a/README.md +++ b/README.md @@ -93,9 +93,11 @@ Documentation consists of template and API docs produced from the plugin JS code * [.PictureSourceType](#module_Camera.PictureSourceType) : <code>enum</code> * [.PopoverArrowDirection](#module_Camera.PopoverArrowDirection) : <code>enum</code> * [.Direction](#module_Camera.Direction) : <code>enum</code> + +* [CameraPopoverOptions](#module_CameraPopoverOptions) * [CameraPopoverHandle](#module_CameraPopoverHandle) -* [CameraPopoverOptions](#module_CameraPopoverOptions) + * [.setPosition(options)](#module_CameraPopoverHandle.setPosition) --- @@ -116,10 +118,7 @@ Once the user snaps the photo, the camera application closes and the application If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or `Camera.PictureSourceType.SAVEDPHOTOALBUM`, then a dialog displays -that allows users to select an existing image. The -`camera.getPicture` function returns a [`CameraPopoverHandle`](#module_CameraPopoverHandle) object, -which can be used to reposition the image selection dialog, for -example, when the device orientation changes. +that allows users to select an existing image. The return value is sent to the [`cameraSuccess`](#module_camera.onSuccess) callback function, in one of the following formats, depending on the specified @@ -364,7 +363,17 @@ location. <a name="module_CameraPopoverHandle"></a> ## CameraPopoverHandle -A handle to an image picker popover. +A handle to the image picker popover. + +<a name="module_CameraPopoverHandle.setPosition"></a> + +### CameraPopoverHandle.setPosition(options) +Can be used to reposition the image selection dialog, for example, when the device orientation changes. + + +| Param | Type | Description | +| --- | --- | --- | +| options | <code>[CameraPopoverOptions](#module_CameraPopoverOptions)</code> | CameraPopoverOptions | __Supported Platforms__ @@ -372,7 +381,7 @@ __Supported Platforms__ **Example** ```js -var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail, +navigator.camera.getPicture(onSuccess, onFail, { destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, @@ -381,6 +390,7 @@ var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail, // Reposition the popover if the orientation changes. window.onorientationchange = function() { + var cameraPopoverHandle = new CameraPopoverHandle(); var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY); cameraPopoverHandle.setPosition(cameraPopoverOptions); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org