From 727ec7cae08eec8396bac7ddab9534cf2201e360 Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Sat, 23 Dec 2017 22:30:17 -0500 Subject: [PATCH] Set innerHTML of non-input elements, not value. This is why labels are not changing. --- app/www/index.html | 2 +- app/www/static/js/intval.core.js | 13 ++++++++----- app/www/static/js/intval.web.js | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/app/www/index.html b/app/www/index.html index 2e3eab4..4bc3fce 100644 --- a/app/www/index.html +++ b/app/www/index.html @@ -52,7 +52,7 @@
- +
diff --git a/app/www/static/js/intval.core.js b/app/www/static/js/intval.core.js index a43fb4d..87b5c4a 100644 --- a/app/www/static/js/intval.core.js +++ b/app/www/static/js/intval.core.js @@ -113,12 +113,15 @@ var setDelayScale = function () { var setDirLabel = function (dir) { const bwdLabel = document.getElementById('bwdLabel'); const fwdLabel = document.getElementById('fwdLabel'); + const but = document.getElementById('frame'); if (dir) { - bwdLabel.classList.remove('selected') - fwdLabel.classList.add('selected') + bwdLabel.classList.remove('selected'); + fwdLabel.classList.add('selected'); + frame.innerHTML = '+1 FRAME'; } else { - fwdLabel.classList.remove('selected') - bwdLabel.classList.add('selected') + fwdLabel.classList.remove('selected'); + bwdLabel.classList.add('selected'); + frame.innerHTML = '-1 FRAME'; } }; var incCounter = function (val) { @@ -162,7 +165,7 @@ var setState = function (res) { exposure = shutter(STATE.exposure); exposureScale = scaleAuto(STATE.exposure); - document.getElementById('str').value = exposure.str; + document.getElementById('str').innerHTML = exposure.str; document.getElementById('scale').value = exposureScale; setExposureScale(); diff --git a/app/www/static/js/intval.web.js b/app/www/static/js/intval.web.js index 371c523..c9163a2 100644 --- a/app/www/static/js/intval.web.js +++ b/app/www/static/js/intval.web.js @@ -89,7 +89,7 @@ web.setExposureSuccess = function (res) { } STATE.exposure = res.exposure; exposure = shutter(STATE.exposure); - document.getElementById('str').value = exposure.str; + document.getElementById('str').innerHTML = exposure.str; console.log(`setExposure to ${res.exposure}`); }; web.setDelay = function () {