Add maxResolution flag

This commit is contained in:
Ron Reiter
2011-04-04 02:57:10 +03:00
parent e766188689
commit 307f9d1871
4 changed files with 50 additions and 3 deletions
+7 -1
View File
@@ -78,6 +78,12 @@ Camera.prototype.getPicture = function(successCallback, errorCallback, options)
if (options.quality) {
quality = this.options.quality;
}
var maxResolution = 0;
if (options.maxResolution) {
maxResolution = this.options.maxResolution;
}
var destinationType = Camera.DestinationType.DATA_URL;
if (this.options.destinationType) {
destinationType = this.options.destinationType;
@@ -86,7 +92,7 @@ Camera.prototype.getPicture = function(successCallback, errorCallback, options)
if (typeof this.options.sourceType === "number") {
sourceType = this.options.sourceType;
}
PhoneGap.exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType]);
PhoneGap.exec(successCallback, errorCallback, "Camera", "takePicture", [quality, destinationType, sourceType, maxResolution]);
};
PhoneGap.addConstructor(function() {