You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/08/17 20:37:56 UTC

[4/10] js commit: Update CameraProxy.js

Update CameraProxy.js

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

Branch: refs/heads/master
Commit: 5f5c576c3f1247d1918cd47c912e884f200c7c7b
Parents: 23ab233
Author: wangmingfeng <mi...@gmail.com>
Authored: Wed Aug 15 16:34:28 2012 +0800
Committer: wangmingfeng <mi...@gmail.com>
Committed: Wed Aug 15 16:34:28 2012 +0800

----------------------------------------------------------------------
 lib/win8metro/plugin/win8metro/CameraProxy.js |   77 --------------------
 1 files changed, 0 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/5f5c576c/lib/win8metro/plugin/win8metro/CameraProxy.js
----------------------------------------------------------------------
diff --git a/lib/win8metro/plugin/win8metro/CameraProxy.js b/lib/win8metro/plugin/win8metro/CameraProxy.js
index 45bd42b..76150db 100644
--- a/lib/win8metro/plugin/win8metro/CameraProxy.js
+++ b/lib/win8metro/plugin/win8metro/CameraProxy.js
@@ -7,23 +7,6 @@ var cordova = require('cordova'),
 
 module.exports = {
 
-	
-// args will contain :
-//  ...  it is an array, so be careful
-// 0 quality:50,
-// 1 destinationType:Camera.DestinationType.FILE_URI,
-// 2 sourceType:Camera.PictureSourceType.CAMERA,
-// 3 targetWidth:-1,
-// 4 targetHeight:-1,
-// 5 encodingType:Camera.EncodingType.JPEG,
-// 6 mediaType:Camera.MediaType.PICTURE,
-// 7 allowEdit:false,
-// 8 correctOrientation:false,
-// 9 saveToPhotoAlbum:false,
-// 10 popoverOptions:null
-
-
-
 /**
  * Gets a picture from source defined by "options.sourceType", and returns the
  * image as defined by the "options.destinationType" option.
@@ -406,65 +389,5 @@ module.exports = {
         })
     }
 	
-	/*
-    if(args[2] == Camera.PictureSourceType.CAMERA) {
-        // display the camera, and capture an image
-        var dialog = new Windows.Media.Capture.CameraCaptureUI();
-        var allowCrop = !!args[7];
-        if(!allowCrop) {
-            dialog.photoSettings.allowCrop = false;
-        }
-        else {
-            var aspectRatio = { width:args[3] > 0 ? args[3] : 1, height: args[4] > 0 ? args[4] : 1};
-            dialog.photoSettings.croppedAspectRatio = aspectRatio;
-        }
-        if(args[5] == Camera.EncodingType.JPEG) {
-            dialog.photoSettings.format = Windows.Media.Capture.CameraCaptureUIPhotoFormat.jpeg;
-        }
-        else if (args[5] == Camera.EncodingType.PNG) {
-            dialog.photoSettings.format = Windows.Media.Capture.CameraCaptureUIPhotoFormat.png;
-        }
-
-        dialog.captureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.photo).done(
-            function(file){
-                if(file) {
-                    console.log("got a file in success handler");
-                    if(args[1] == Camera.DestinationType.FILE_URI)
-                    {
-                        var imageBlobUrl = URL.createObjectURL(file);
-                        win(imageBlobUrl);
-                    }
-                }
-                else {
-                    console.log("success handler without file ...");
-                }
-            },
-            function(err) {
-                console.log("err in camerq");
-            });
-    }
-    else {
-        // grab from the photo library
-        var picker = new Windows.Storage.Pickers.FileOpenPicker();
-        picker.viewMode = Windows.Storage.Pickers.PickerViewMode.thumbnail;
-        picker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.picturesLibrary;
-
-        picker.fileTypeFilter.replaceAll([".png", ".jpg", ".jpeg"]);
-
-        picker.pickSingleFileAsync().then(function (file) {
-            if (file) {
-                console.log("got a file in success handler");
-                if(args[1] == Camera.DestinationType.FILE_URI)
-                {
-                    var imageBlobUrl = URL.createObjectURL(file);
-                    win(imageBlobUrl);
-                }
-            } else {
-                // cancelled ??
-                console.log("success handler without file ...");
-            }
-        });
-    }*/
-	
 }
 };
\ No newline at end of file