From 4c2c567fd874a861d4707b1a5c2e268fb56f4d76 Mon Sep 17 00:00:00 2001 From: Jesse MacFadyen Date: Tue, 8 Apr 2014 12:19:44 -0700 Subject: [PATCH] WP8 When only targetWidth or targetHeight is provided, use it as the only bound --- src/wp/Camera.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wp/Camera.cs b/src/wp/Camera.cs index 87617e4..b76929b 100644 --- a/src/wp/Camera.cs +++ b/src/wp/Camera.cs @@ -197,6 +197,16 @@ namespace WPCordovaClassLib.Cordova.Commands cameraOptions.AllowEdit = bool.Parse(args[7]); cameraOptions.CorrectOrientation = bool.Parse(args[8]); cameraOptions.SaveToPhotoAlbum = bool.Parse(args[9]); + + // a very large number will force the other value to be the bound + if (cameraOptions.TargetWidth > -1 && cameraOptions.TargetHeight == -1) + { + cameraOptions.TargetHeight = 100000; + } + else if (cameraOptions.TargetHeight > -1 && cameraOptions.TargetWidth == -1) + { + cameraOptions.TargetWidth = 100000; + } } catch (Exception ex) {