cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject js commit: [CB-1686] Added a camera direction option.
Date Thu, 14 Mar 2013 17:55:56 GMT
Updated Branches:
  refs/heads/master d79881dc2 -> ee0451759


[CB-1686] Added a camera direction option.


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/ee045175
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/ee045175
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/ee045175

Branch: refs/heads/master
Commit: ee045175931ab6b6f21f0321a26579d9273aafdd
Parents: d79881d
Author: Max Woghiren <max.woghiren@gmail.com>
Authored: Wed Mar 13 14:27:34 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Mar 14 13:55:50 2013 -0400

----------------------------------------------------------------------
 lib/common/plugin/Camera.js          |    3 ++-
 lib/common/plugin/CameraConstants.js |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ee045175/lib/common/plugin/Camera.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/Camera.js b/lib/common/plugin/Camera.js
index 5794b91..b197bd7 100644
--- a/lib/common/plugin/Camera.js
+++ b/lib/common/plugin/Camera.js
@@ -57,9 +57,10 @@ cameraExport.getPicture = function(successCallback, errorCallback, options)
{
     var correctOrientation = !!options.correctOrientation;
     var saveToPhotoAlbum = !!options.saveToPhotoAlbum;
     var popoverOptions = getValue(options.popoverOptions, null);
+    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);
 
     var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,
-                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions];
+                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions,
cameraDirection];
 
     exec(successCallback, errorCallback, "Camera", "takePicture", args);
     return new CameraPopoverHandle();

http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ee045175/lib/common/plugin/CameraConstants.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/CameraConstants.js b/lib/common/plugin/CameraConstants.js
index ac23926..ae4e534 100644
--- a/lib/common/plugin/CameraConstants.js
+++ b/lib/common/plugin/CameraConstants.js
@@ -45,5 +45,9 @@ module.exports = {
       ARROW_LEFT : 4,
       ARROW_RIGHT : 8,
       ARROW_ANY : 15
+  },
+  Direction:{
+      BACK: 0,
+      FRONT: 1
   }
 };


Mime
View raw message