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 () {
unsetPages();
document.getElementById('app').classList.add('selected');
@ -278,19 +261,20 @@ var spinnerHide = function () {
if (elem.classList.contains('active')) {
elem.classList.remove('active');
}
}
};
var isNumeric = function (n) {
return !isNaN(parseFloat(n)) && isFinite(n);
};
var init = function () {
syncInputs('.angle', (val) => {
BOLEX.angle = parseInt(val);
});
syncInputs('.iso', (val) => {
BOLEX.iso = parseInt(val);
});
syncInputs('.fstop', (val) => {
BOLEX.fstop = parseFloat(val);
});
document.querySelector('.angle').oninput = function () {
BOLEX.angle = parseInt(this.value);
};
document.querySelector('.iso').oninput = function () {
BOLEX.iso = parseInt(this.value);
};
document.querySelector('.fstop').oninput = function () {
BOLEX.fstop = parseFloat(this.value);
};
};