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.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
@ -247,25 +272,19 @@ var spinnerInit = function () {
, hwaccel: true // Whether to use hardware acceleration
, position: 'relative' // Element positioning
};
const target = document.getElementById('spinner');
const spinner = new Spinner(spinnerOpts).spin(target);
UI.spinner.init = function () {
const spinner = new Spinner(UI.spinner.opts).spin(UI.spinner.elem);
};
var spinnerShow = function () {
const elem = document.getElementById('overlay');
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 () {
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 () {