Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 57 additions and 38 deletions
Showing only changes of commit fd0ad6f063 - Show all commits

View File

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