forked from public/cordova-plugin-camera
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d10bf50c61 | ||
|
|
b7af490a3e | ||
|
|
c2e4d1f36d | ||
|
|
d0fe66e1d5 | ||
|
|
af36e74d05 | ||
|
|
629dbcb712 | ||
|
|
bc7c4278ef | ||
|
|
302aacb214 |
@@ -175,3 +175,25 @@
|
||||
* CB-8559 Integrate TravisCI
|
||||
* CB-8438 cordova-plugin-camera documentation translation: cordova-plugin-camera
|
||||
* CB-8538 Added package.json file
|
||||
|
||||
### 1.0.0 (Apr 15, 2015)
|
||||
* CB-8780 - Display popover using main thread. Fixes popover slowness (closes #81)
|
||||
* CB-8746 bumped version of file dependency
|
||||
* CB-8746 gave plugin major version bump
|
||||
* CB-8707 refactoring windows code to improve readability
|
||||
* CB-8706 use filePicker if saveToPhotoAlbum is true
|
||||
* CB-8706 remove unnecessary capabilities from xml
|
||||
* CB-8747 updated dependency, added peer dependency
|
||||
* CB-8683 updated blackberry specific references of org.apache.cordova.camera to cordova-plugin-camera
|
||||
* CB-8782: Updated the docs to talk about the allowEdit quirks, it's not 100% working, but better than it was
|
||||
* CB-8782: Fixed the flow so that we save the cropped image and use it, not the original non-cropped. Crop only supports G+ Photos Crop, other crops may not work, depending on the OEM
|
||||
* CB-8740: Removing FileHelper call that was failing on Samsung Galaxy S3, now that we have a real path, we only need to update the MediaStore, not pull from it in this case
|
||||
* CB-8740: Partial fix for Save Image to Gallery error found in MobileSpec
|
||||
* CB-8683 changed plugin-id to pacakge-name
|
||||
* CB-8653 properly updated translated docs to use new id
|
||||
* CB-8653 updated translated docs to use new id
|
||||
* CB-8351 Fix custom implementation of integerValueForKey (close #79)
|
||||
* Fix cordova-paramedic path change, build with TRAVIS_BUILD_DIR, use npm to install paramedic
|
||||
* docs: added 'Windows' to supported platforms
|
||||
* CB-8653 Updated Readme
|
||||
* CB-8659: ios: 4.0.x Compatibility: Remove use of deprecated headers
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cordova-plugin-camera",
|
||||
"version": "0.3.7-dev",
|
||||
"version": "1.0.0",
|
||||
"description": "Cordova Camera Plugin",
|
||||
"cordova": {
|
||||
"id": "cordova-plugin-camera",
|
||||
@@ -39,7 +39,7 @@
|
||||
"cordova-windows"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"cordova-plugin-file": ">=1.0.1"
|
||||
"cordova-plugin-file": ">=2.0.0"
|
||||
},
|
||||
"author": "Apache Software Foundation",
|
||||
"license": "Apache 2.0"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:rim="http://www.blackberry.com/ns/widgets"
|
||||
id="cordova-plugin-camera"
|
||||
version="0.3.7-dev">
|
||||
version="1.0.0">
|
||||
<name>Camera</name>
|
||||
<description>Cordova Camera Plugin</description>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
@@ -130,8 +130,8 @@ static NSString* toBase64(NSData* data) {
|
||||
[self.commandDelegate runInBackground:^{
|
||||
|
||||
CDVPictureOptions* pictureOptions = [CDVPictureOptions createFromTakePictureArguments:command];
|
||||
pictureOptions.popoverSupported = [self popoverSupported];
|
||||
pictureOptions.usesGeolocation = [self usesGeolocation];
|
||||
pictureOptions.popoverSupported = [weakSelf popoverSupported];
|
||||
pictureOptions.usesGeolocation = [weakSelf usesGeolocation];
|
||||
pictureOptions.cropToSize = NO;
|
||||
|
||||
BOOL hasCamera = [UIImagePickerController isSourceTypeAvailable:pictureOptions.sourceType];
|
||||
@@ -142,13 +142,6 @@ static NSString* toBase64(NSData* data) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If a popover is already open, close it; we only want one at a time.
|
||||
if (([[weakSelf pickerController] pickerPopoverController] != nil) && [[[weakSelf pickerController] pickerPopoverController] isPopoverVisible]) {
|
||||
[[[weakSelf pickerController] pickerPopoverController] dismissPopoverAnimated:YES];
|
||||
[[[weakSelf pickerController] pickerPopoverController] setDelegate:nil];
|
||||
[[weakSelf pickerController] setPickerPopoverController:nil];
|
||||
}
|
||||
|
||||
CDVCameraPicker* cameraPicker = [CDVCameraPicker createFromPictureOptions:pictureOptions];
|
||||
weakSelf.pickerController = cameraPicker;
|
||||
|
||||
@@ -157,20 +150,27 @@ static NSString* toBase64(NSData* data) {
|
||||
// we need to capture this state for memory warnings that dealloc this object
|
||||
cameraPicker.webView = weakSelf.webView;
|
||||
|
||||
if ([weakSelf popoverSupported] && (pictureOptions.sourceType != UIImagePickerControllerSourceTypeCamera)) {
|
||||
if (cameraPicker.pickerPopoverController == nil) {
|
||||
cameraPicker.pickerPopoverController = [[NSClassFromString(@"UIPopoverController") alloc] initWithContentViewController:cameraPicker];
|
||||
// Perform UI operations on the main thread
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// If a popover is already open, close it; we only want one at a time.
|
||||
if (([[weakSelf pickerController] pickerPopoverController] != nil) && [[[weakSelf pickerController] pickerPopoverController] isPopoverVisible]) {
|
||||
[[[weakSelf pickerController] pickerPopoverController] dismissPopoverAnimated:YES];
|
||||
[[[weakSelf pickerController] pickerPopoverController] setDelegate:nil];
|
||||
[[weakSelf pickerController] setPickerPopoverController:nil];
|
||||
}
|
||||
[weakSelf displayPopover:pictureOptions.popoverOptions];
|
||||
weakSelf.hasPendingOperation = NO;
|
||||
|
||||
} else {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if ([weakSelf popoverSupported] && (pictureOptions.sourceType != UIImagePickerControllerSourceTypeCamera)) {
|
||||
if (cameraPicker.pickerPopoverController == nil) {
|
||||
cameraPicker.pickerPopoverController = [[NSClassFromString(@"UIPopoverController") alloc] initWithContentViewController:cameraPicker];
|
||||
}
|
||||
[weakSelf displayPopover:pictureOptions.popoverOptions];
|
||||
weakSelf.hasPendingOperation = NO;
|
||||
} else {
|
||||
[weakSelf.viewController presentViewController:cameraPicker animated:YES completion:^{
|
||||
weakSelf.hasPendingOperation = NO;
|
||||
}];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:rim="http://www.blackberry.com/ns/widgets"
|
||||
id="cordova-plugin-camera-tests"
|
||||
version="0.3.7-dev">
|
||||
version="1.0.0">
|
||||
<name>Cordova Camera Plugin Tests</name>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
<dependency id="cordova-plugin-file" version=">=1.0.1" />
|
||||
<dependency id="cordova-plugin-file" version=">=2.0.0" />
|
||||
|
||||
<js-module src="tests.js" name="tests">
|
||||
</js-module>
|
||||
|
||||
Reference in New Issue
Block a user