mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2026-04-29 00:02:13 +08:00
fix(ios)! remove iPadOS popover code (#941)
- On iPadOS it was possible to configure a popover for setting the position, width and arrow position of the popover. The code used the deprecated `UIPopoverController`, which would have to be fixed. To keep the plugin also maintainable, this was removed. - The popover could repositioned with a `CameraPopoverHandle` on a `window.onorientationchange`. This was removed also. - Removed documentation for popover from `README.md`
This commit is contained in:
+2
-8
@@ -19,7 +19,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* globals Camera, resolveLocalFileSystemURL, FileEntry, CameraPopoverOptions, LocalFileSystem */
|
||||
/* globals Camera, resolveLocalFileSystemURL, FileEntry, LocalFileSystem */
|
||||
/* eslint-env jasmine */
|
||||
|
||||
exports.defineAutoTests = function () {
|
||||
@@ -156,13 +156,7 @@ exports.defineManualTests = function (contentEl, createActionButton) {
|
||||
clearStatus();
|
||||
const options = extractOptions();
|
||||
log('Getting picture with options: ' + JSON.stringify(options));
|
||||
const popoverHandle = navigator.camera.getPicture(getPictureWin, onGetPictureError, options);
|
||||
|
||||
// Reposition the popover if the orientation changes.
|
||||
window.onorientationchange = function () {
|
||||
const newPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, 0, 300, 400);
|
||||
popoverHandle.setPosition(newPopoverOptions);
|
||||
};
|
||||
navigator.camera.getPicture(getPictureWin, onGetPictureError, options);
|
||||
}
|
||||
|
||||
function logCallback (apiName, success) {
|
||||
|
||||
Reference in New Issue
Block a user