CB-9070 Update CameraPopoverHandle docs to reflect README update
This commit is contained in:
parent
6e19147b09
commit
7813ad9bef
20
README.md
20
README.md
@ -93,11 +93,9 @@ Documentation consists of template and API docs produced from the plugin JS code
|
|||||||
* [.PictureSourceType](#module_Camera.PictureSourceType) : <code>enum</code>
|
* [.PictureSourceType](#module_Camera.PictureSourceType) : <code>enum</code>
|
||||||
* [.PopoverArrowDirection](#module_Camera.PopoverArrowDirection) : <code>enum</code>
|
* [.PopoverArrowDirection](#module_Camera.PopoverArrowDirection) : <code>enum</code>
|
||||||
* [.Direction](#module_Camera.Direction) : <code>enum</code>
|
* [.Direction](#module_Camera.Direction) : <code>enum</code>
|
||||||
|
|
||||||
* [CameraPopoverOptions](#module_CameraPopoverOptions)
|
|
||||||
|
|
||||||
* [CameraPopoverHandle](#module_CameraPopoverHandle)
|
* [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 |
|
| Name | Type | Default | Description |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| PHOTOLIBRARY | <code>number</code> | <code>0</code> | Choose image from the device's photo library (same as SAVEDPHOTOALBUM for Android) |
|
| PHOTOLIBRARY | <code>number</code> | <code>0</code> | Choose image from picture library (same as SAVEDPHOTOALBUM for Android) |
|
||||||
| CAMERA | <code>number</code> | <code>1</code> | Take picture from camera |
|
| CAMERA | <code>number</code> | <code>1</code> | Take picture from camera |
|
||||||
| SAVEDPHOTOALBUM | <code>number</code> | <code>2</code> | Choose image only from the device's Camera Roll album (same as PHOTOLIBRARY for Android) |
|
| SAVEDPHOTOALBUM | <code>number</code> | <code>2</code> | Choose image from picture library (same as PHOTOLIBRARY for Android) |
|
||||||
|
|
||||||
<a name="module_Camera.PopoverArrowDirection"></a>
|
<a name="module_Camera.PopoverArrowDirection"></a>
|
||||||
|
|
||||||
@ -363,17 +361,7 @@ location.
|
|||||||
<a name="module_CameraPopoverHandle"></a>
|
<a name="module_CameraPopoverHandle"></a>
|
||||||
|
|
||||||
## CameraPopoverHandle
|
## CameraPopoverHandle
|
||||||
A handle to the image picker popover.
|
A handle to an 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__
|
__Supported Platforms__
|
||||||
|
|
||||||
|
@ -89,10 +89,7 @@ for (var key in Camera) {
|
|||||||
*
|
*
|
||||||
* If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
|
* If `Camera.sourceType` is `Camera.PictureSourceType.PHOTOLIBRARY` or
|
||||||
* `Camera.PictureSourceType.SAVEDPHOTOALBUM`, then a dialog displays
|
* `Camera.PictureSourceType.SAVEDPHOTOALBUM`, then a dialog displays
|
||||||
* that allows users to select an existing image. The
|
* that allows users to select an existing image.
|
||||||
* `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.
|
|
||||||
*
|
*
|
||||||
* The return value is sent to the [`cameraSuccess`]{@link module:camera.onSuccess} callback function, in
|
* The return value is sent to the [`cameraSuccess`]{@link module:camera.onSuccess} callback function, in
|
||||||
* one of the following formats, depending on the specified
|
* one of the following formats, depending on the specified
|
||||||
|
@ -33,7 +33,7 @@ var exec = require('cordova/exec');
|
|||||||
* - iOS
|
* - iOS
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail,
|
* navigator.camera.getPicture(onSuccess, onFail,
|
||||||
* {
|
* {
|
||||||
* destinationType: Camera.DestinationType.FILE_URI,
|
* destinationType: Camera.DestinationType.FILE_URI,
|
||||||
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
|
* sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
|
||||||
@ -42,13 +42,19 @@ var exec = require('cordova/exec');
|
|||||||
*
|
*
|
||||||
* // Reposition the popover if the orientation changes.
|
* // Reposition the popover if the orientation changes.
|
||||||
* window.onorientationchange = function() {
|
* window.onorientationchange = function() {
|
||||||
|
* var cameraPopoverHandle = new CameraPopoverHandle();
|
||||||
* var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
|
* var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY);
|
||||||
* cameraPopoverHandle.setPosition(cameraPopoverOptions);
|
* cameraPopoverHandle.setPosition(cameraPopoverOptions);
|
||||||
* }
|
* }
|
||||||
* @module CameraPopoverHandle
|
* @module CameraPopoverHandle
|
||||||
*/
|
*/
|
||||||
var CameraPopoverHandle = function() {
|
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
|
* @param {module:CameraPopoverOptions} popoverOptions
|
||||||
*/
|
*/
|
||||||
this.setPosition = function(popoverOptions) {
|
this.setPosition = function(popoverOptions) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user