Adding comments
This commit is contained in:
parent
9a9081b0d4
commit
06fcbf05a2
@ -381,7 +381,7 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
|
|||||||
|
|
||||||
if (FocusControl.supported === true) {
|
if (FocusControl.supported === true) {
|
||||||
capturePreview.addEventListener('click', function () {
|
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') {
|
if (this.getAttribute('clicked') === '1') {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@ -390,6 +390,7 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
|
|||||||
var preset = Windows.Media.Devices.FocusPreset.autoNormal;
|
var preset = Windows.Media.Devices.FocusPreset.autoNormal;
|
||||||
var parent = this;
|
var parent = this;
|
||||||
FocusControl.setPresetAsync(preset).done(function () {
|
FocusControl.setPresetAsync(preset).done(function () {
|
||||||
|
// set the clicked attribute back to '0' to allow focus again
|
||||||
parent.setAttribute('clicked', '0');
|
parent.setAttribute('clicked', '0');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user