You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/06/01 12:26:52 UTC

git commit: [flex-asjs] [refs/heads/release0.8.0] - Clean up Camera code.

Repository: flex-asjs
Updated Branches:
  refs/heads/release0.8.0 71d7d8b5b -> 7a030dbc1


Clean up Camera code.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7a030dbc
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7a030dbc
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7a030dbc

Branch: refs/heads/release0.8.0
Commit: 7a030dbc1d174e9bd022eb0b1a524c4495745bb5
Parents: 71d7d8b
Author: Peter Ent <pe...@apache.org>
Authored: Thu Jun 1 08:26:50 2017 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Thu Jun 1 08:26:50 2017 -0400

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/cordova/Camera.as    | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7a030dbc/frameworks/projects/Mobile/src/main/flex/org/apache/flex/cordova/Camera.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/cordova/Camera.as b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/cordova/Camera.as
index 8333fb2..ace3c01 100644
--- a/frameworks/projects/Mobile/src/main/flex/org/apache/flex/cordova/Camera.as
+++ b/frameworks/projects/Mobile/src/main/flex/org/apache/flex/cordova/Camera.as
@@ -54,28 +54,23 @@ package org.apache.flex.cordova
 	 */
 	COMPILE::JS
 	public class Camera
-	{
-		private var pictureSource:*;   // picture source
-		private var destinationType:*; // sets the format of returned value
-		
+	{		
 		public function Camera()
 		{
-			pictureSource=navigator['camera'].PictureSourceType;
-			destinationType=navigator['camera'].DestinationType;
 		}
 		
 		public function capturePhoto(onPhotoDataSuccess:Function, onFail:Function):void
 		{
-			// Take picture using device camera and retrieve image as base64-encoded string
+			// Take picture using device camera and retrieve image as URI
 			navigator['camera'].getPicture(onPhotoDataSuccess, onFail, { quality: 50,
-				destinationType: destinationType.FILE_URI }); //DATA_URL
+				destinationType: navigator['camera'].DestinationType.FILE_URI });
 		}
 		
 		public function getPhotoFromLibrary(onPhotoURISuccess:Function, onFail:Function):void
 		{
 			// Retrieve image file location from specified source
 			navigator['camera'].getPicture(onPhotoURISuccess, onFail, { quality: 50,
-				destinationType: destinationType.FILE_URI,
+				destinationType: navigator['camera'].DestinationType.FILE_URI,
 				sourceType: navigator['camera'].PictureSourceType.PHOTOLIBRARY });
 		}