Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E1659D99A for ; Fri, 17 Aug 2012 18:37:56 +0000 (UTC) Received: (qmail 58289 invoked by uid 500); 17 Aug 2012 18:37:56 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 58243 invoked by uid 500); 17 Aug 2012 18:37:56 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 58185 invoked by uid 99); 17 Aug 2012 18:37:56 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 18:37:56 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4F8451DE82; Fri, 17 Aug 2012 18:37:56 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: purplecabbage@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [4/10] js commit: Update CameraProxy.js Message-Id: <20120817183756.4F8451DE82@tyr.zones.apache.org> Date: Fri, 17 Aug 2012 18:37:56 +0000 (UTC) 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 Authored: Wed Aug 15 16:34:28 2012 +0800 Committer: wangmingfeng 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