From 7813ad9befd00b419f0caf3a6d0c0d9af87a4be5 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Tue, 23 Aug 2016 16:14:11 +0300 Subject: [PATCH] CB-9070 Update CameraPopoverHandle docs to reflect README update --- README.md | 20 ++++---------------- www/Camera.js | 5 +---- www/ios/CameraPopoverHandle.js | 10 ++++++++-- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index c5f594b..4294bd2 100644 --- a/README.md +++ b/README.md @@ -93,11 +93,9 @@ Documentation consists of template and API docs produced from the plugin JS code * [.PictureSourceType](#module_Camera.PictureSourceType) : enum * [.PopoverArrowDirection](#module_Camera.PopoverArrowDirection) : enum * [.Direction](#module_Camera.Direction) : enum - -* [CameraPopoverOptions](#module_CameraPopoverOptions) * [CameraPopoverHandle](#module_CameraPopoverHandle) - * [.setPosition(options)](#module_CameraPopoverHandle.setPosition) +* [CameraPopoverOptions](#module_CameraPopoverOptions) --- @@ -305,9 +303,9 @@ change, cropping, etc.) due to implementation specific. | Name | Type | Default | Description | | --- | --- | --- | --- | -| PHOTOLIBRARY | number | 0 | Choose image from the device's photo library (same as SAVEDPHOTOALBUM for Android) | +| PHOTOLIBRARY | number | 0 | Choose image from picture library (same as SAVEDPHOTOALBUM for Android) | | CAMERA | number | 1 | Take picture from camera | -| SAVEDPHOTOALBUM | number | 2 | Choose image only from the device's Camera Roll album (same as PHOTOLIBRARY for Android) | +| SAVEDPHOTOALBUM | number | 2 | Choose image from picture library (same as PHOTOLIBRARY for Android) | @@ -363,17 +361,7 @@ location. ## CameraPopoverHandle -A handle to the image picker popover. - - - -### CameraPopoverHandle.setPosition(options) -Can be used to reposition the image selection dialog, for example, when the device orientation changes. - - -| Param | Type | Description | -| --- | --- | --- | -| options | [CameraPopoverOptions](#module_CameraPopoverOptions) | CameraPopoverOptions | +A handle to an image picker popover. __Supported Platforms__ diff --git a/www/Camera.js b/www/Camera.js index 04d13d9..d006787 100644 --- a/www/Camera.js +++ b/www/Camera.js @@ -89,10 +89,7 @@ for (var key in Camera) { * * 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`]{@link 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`]{@link module:camera.onSuccess} callback function, in * one of the following formats, depending on the specified diff --git a/www/ios/CameraPopoverHandle.js b/www/ios/CameraPopoverHandle.js index 3990e18..8b92137 100644 --- a/www/ios/CameraPopoverHandle.js +++ b/www/ios/CameraPopoverHandle.js @@ -33,7 +33,7 @@ var exec = require('cordova/exec'); * - iOS * * @example - * var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail, + * navigator.camera.getPicture(onSuccess, onFail, * { * destinationType: Camera.DestinationType.FILE_URI, * sourceType: Camera.PictureSourceType.PHOTOLIBRARY, @@ -42,13 +42,19 @@ var exec = require('cordova/exec'); * * // 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); * } * @module CameraPopoverHandle */ var CameraPopoverHandle = function() { - /** Set the position of the popover. + /** + * Can be used to reposition the image selection dialog, + * for example, when the device orientation changes. + * @memberof CameraPopoverHandle + * @instance + * @method setPosition * @param {module:CameraPopoverOptions} popoverOptions */ this.setPosition = function(popoverOptions) {