Repository: cordova-plugin-camera Updated Branches: refs/heads/master 6f7ce333c -> 06fcbf05a
Camera tapping fix 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/9a9081b0 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/9a9081b0 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/9a9081b0 Branch: refs/heads/master Commit: 9a9081b0d4f1a49c7bf6fee6f0b1c273dfeedf76 Parents: 6f7ce33 Author: PerfectionCSGO <[email protected]> Authored: Mon Dec 28 15:24:24 2015 +0100 Committer: Raghav Katyal <[email protected]> Committed: Thu Jan 21 14:07:51 2016 -0800 ---------------------------------------------------------------------- src/windows/CameraProxy.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/9a9081b0/src/windows/CameraProxy.js ---------------------------------------------------------------------- diff --git a/src/windows/CameraProxy.js b/src/windows/CameraProxy.js index da8cf7d..e45ec9d 100644 --- a/src/windows/CameraProxy.js +++ b/src/windows/CameraProxy.js @@ -381,11 +381,16 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) { if (FocusControl.supported === true) { capturePreview.addEventListener('click', function () { - + // Make sure user can't click more than once + if (this.getAttribute('clicked') === '1') { + return false; + } else { + this.setAttribute('clicked', '1'); + } var preset = Windows.Media.Devices.FocusPreset.autoNormal; - + var parent = this; FocusControl.setPresetAsync(preset).done(function () { - + parent.setAttribute('clicked', '0'); }); }); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
