Add global placeholders for reset, restart and update.
This commit is contained in:
parent
b657367ba4
commit
fd0ad6f063
|
@ -24,6 +24,9 @@ window.setExposure = null;
|
|||
window.setDelay = null;
|
||||
window.setCounter = null;
|
||||
window.sequence = null;
|
||||
window.reset = null;
|
||||
window.restart = null;
|
||||
window.update = null;
|
||||
|
||||
//ms
|
||||
var shutter = function (exposure) {
|
||||
|
@ -224,8 +227,30 @@ var cameraPage = function () {
|
|||
document.getElementById('camera').classList.add('selected');
|
||||
document.getElementById('cameraIcon').classList.add('selected');
|
||||
};
|
||||
var spinnerInit = function () {
|
||||
const spinnerOpts = {
|
||||
|
||||
var isNumeric = function (n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
};
|
||||
|
||||
var UI = {};
|
||||
|
||||
UI.overlay = {
|
||||
elem : document.getElementById('overlay')
|
||||
}
|
||||
UI.overlay.show = function () {
|
||||
if (!UI.overlay.elem.classList.contains('active')) {
|
||||
UI.overlay.elem.classList.add('active');
|
||||
}
|
||||
};
|
||||
UI.overlay.hide = function () {
|
||||
if (UI.overlay.elem.classList.contains('active')) {
|
||||
UI.overlay.elem.classList.remove('active');
|
||||
}
|
||||
};
|
||||
UI.spinner = {
|
||||
elem : document.getElementById('spinner')
|
||||
}
|
||||
UI.spinner.opts = {
|
||||
lines: 13 // The number of lines to draw
|
||||
, length: 33 // The length of each line
|
||||
, width: 11 // The line thickness
|
||||
|
@ -246,26 +271,20 @@ var spinnerInit = function () {
|
|||
, shadow: true // Whether to render a shadow
|
||||
, hwaccel: true // Whether to use hardware acceleration
|
||||
, position: 'relative' // Element positioning
|
||||
};
|
||||
const target = document.getElementById('spinner');
|
||||
const spinner = new Spinner(spinnerOpts).spin(target);
|
||||
};
|
||||
var spinnerShow = function () {
|
||||
const elem = document.getElementById('overlay');
|
||||
if (!elem.classList.contains('active')) {
|
||||
elem.classList.add('active');
|
||||
UI.spinner.init = function () {
|
||||
const spinner = new Spinner(UI.spinner.opts).spin(UI.spinner.elem);
|
||||
};
|
||||
UI.spinner.show = function () {
|
||||
if (!UI.spinner.elem.classList.contains('active')) {
|
||||
UI.spinner.elem.classList.add('active');
|
||||
}
|
||||
};
|
||||
var spinnerHide = function () {
|
||||
const elem = document.getElementById('overlay');
|
||||
if (elem.classList.contains('active')) {
|
||||
elem.classList.remove('active');
|
||||
UI.spinner.hide = function () {
|
||||
if (UI.spinner.elem.classList.contains('active')) {
|
||||
UI.spinner.elem.classList.remove('active');
|
||||
}
|
||||
};
|
||||
var isNumeric = function (n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
};
|
||||
|
||||
|
||||
var init = function () {
|
||||
document.querySelector('.angle').oninput = function () {
|
||||
|
|
Loading…
Reference in New Issue