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 11 additions and 27 deletions
Showing only changes of commit 29485137ca - Show all commits

View File

@ -203,23 +203,6 @@ var seqState = function (state) {
} }
}; };
var syncInputs = function (selector, cb) {
const elems = document.querySelectorAll(selector);
[].forEach.call(elems, function (input) {
input.oninput = function () {
setInputs(selector, this.value)
cb(this.value)
}
});
};
var setInputs = function (selector, value) {
const elems = document.querySelectorAll(selector);
[].forEach.call(elems, function (input) {
input.value = value;
});
};
var appPage = function () { var appPage = function () {
unsetPages(); unsetPages();
document.getElementById('app').classList.add('selected'); document.getElementById('app').classList.add('selected');
@ -278,19 +261,20 @@ var spinnerHide = function () {
if (elem.classList.contains('active')) { if (elem.classList.contains('active')) {
elem.classList.remove('active'); elem.classList.remove('active');
} }
} };
var isNumeric = function (n) { var isNumeric = function (n) {
return !isNaN(parseFloat(n)) && isFinite(n); return !isNaN(parseFloat(n)) && isFinite(n);
}; };
var init = function () { var init = function () {
syncInputs('.angle', (val) => { document.querySelector('.angle').oninput = function () {
BOLEX.angle = parseInt(val); BOLEX.angle = parseInt(this.value);
}); };
syncInputs('.iso', (val) => { document.querySelector('.iso').oninput = function () {
BOLEX.iso = parseInt(val); BOLEX.iso = parseInt(this.value);
}); };
syncInputs('.fstop', (val) => { document.querySelector('.fstop').oninput = function () {
BOLEX.fstop = parseFloat(val); BOLEX.fstop = parseFloat(this.value);
}); };
}; };