Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated js for iOS only parameter cropToTargetSize (Camera.getPicture)

  • Loading branch information...
commit e405c251c2d2b9e84b3e6a8374f7f6851f0df2ec 1 parent 837ab69
@shazron shazron authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 CordovaLib/javascript/cordova.ios.js
View
14 CordovaLib/javascript/cordova.ios.js
@@ -1,4 +1,6 @@
-// File generated at :: Tue Apr 10 2012 12:28:18 GMT-0700 (PDT)
+// commit 4c1f4dc98859eabf86bb510c73dbc1b9eae356e2
+
+// File generated at :: Wed Apr 11 2012 17:04:38 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -1103,13 +1105,19 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
correctOrientation = options.correctOrientation <=0 ? false : true;
}
var saveToPhotoAlbum = false;
- if (typeof options.saveToPhotoAlbum == "boolean") {
+ if (typeof options.saveToPhotoAlbum == "boolean") {
saveToPhotoAlbum = options.saveToPhotoAlbum;
} else if (typeof options.saveToPhotoAlbum == "number") {
saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;
}
+ var cropToTargetSize = false;
+ if (typeof options.cropToTargetSize == "boolean") {
+ cropToTargetSize = options.cropToTargetSize;
+ } else if (typeof options.cropToTargetSize == "number") {
+ cropToTargetSize = options.cropToTargetSize <= 0 ? false : true;
+ }
- exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum]);
+ exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType, mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, cropToTargetSize]);
}
module.exports = cameraExport;
Please sign in to comment.
Something went wrong with that request. Please try again.