You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ni...@apache.org on 2016/01/22 01:06:24 UTC
[2/2] cordova-plugin-camera git commit: Adding comments
Adding comments
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/06fcbf05
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/06fcbf05
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/06fcbf05
Branch: refs/heads/master
Commit: 06fcbf05a25a55316445d5b9ded58c8853a7d784
Parents: 9a9081b
Author: Raghav Katyal <ra...@microsoft.com>
Authored: Thu Jan 21 14:11:59 2016 -0800
Committer: Raghav Katyal <ra...@microsoft.com>
Committed: Thu Jan 21 14:11:59 2016 -0800
----------------------------------------------------------------------
src/windows/CameraProxy.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/06fcbf05/src/windows/CameraProxy.js
----------------------------------------------------------------------
diff --git a/src/windows/CameraProxy.js b/src/windows/CameraProxy.js
index e45ec9d..36e53d7 100644
--- a/src/windows/CameraProxy.js
+++ b/src/windows/CameraProxy.js
@@ -381,7 +381,7 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
if (FocusControl.supported === true) {
capturePreview.addEventListener('click', function () {
- // Make sure user can't click more than once
+ // Make sure function isn't called again before previous focus is completed
if (this.getAttribute('clicked') === '1') {
return false;
} else {
@@ -390,6 +390,7 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
var preset = Windows.Media.Devices.FocusPreset.autoNormal;
var parent = this;
FocusControl.setPresetAsync(preset).done(function () {
+ // set the clicked attribute back to '0' to allow focus again
parent.setAttribute('clicked', '0');
});
});
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org