Set innerHTML of non-input elements, not value. This is why labels are not changing.

This commit is contained in:
mmcw-dev 2017-12-23 22:30:17 -05:00
parent f044c0eee3
commit 727ec7cae0
3 changed files with 10 additions and 7 deletions

View File

@ -52,7 +52,7 @@
<button id="seq" onclick="sequence();">START SEQUENCE</button>
</div>
<div>
<button id="frame" onclick="frame();">1 FRAME</button>
<button id="frame" onclick="frame();">+1 FRAME</button>
</div>
</div>
<div id="settings" class="page">

View File

@ -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();

View File

@ -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 () {