Commit 3a35e7f0 authored by Joel Collins's avatar Joel Collins
Browse files

Update inputs from JS on document load

parent 740bf8fb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -29,11 +29,14 @@ var fovY = 3146;

window.onload = function() {
    getStagePositions()
    updateTextBoxes()
}

function updateTextBoxes() {
    document.getElementById('stageVelocityText').value = stageVelocity;
    document.getElementById('stageVelocityInput').value = stageVelocity;
    document.getElementById('focusVelocityText').value = focusVelocity;
    document.getElementById('focusVelocityInput').value = focusVelocity;

    document.getElementById('fovXText').value = fovX;
    document.getElementById('fovYText').value = fovY;
+6 −6
Original line number Diff line number Diff line
@@ -28,14 +28,14 @@
          <div class="clearfix">
              <div class="left-col">FOV width:</div> 
              <div class="right-col"> 
                <input type="text" id="fovXText" value="4100" size="4" onchange="fovX = Number(this.value); updateTextBoxes();">
                <input type="text" id="fovXText" size="4" onchange="fovX = Number(this.value); updateTextBoxes();">
              </div> 
          </div>

          <div class="clearfix">
              <div class="left-col">FOV height:</div> 
              <div class="right-col"> 
                  <input type="text" id="fovYText" value="3146" size="4" onchange="fovY = Number(this.value); updateTextBoxes();">
                  <input type="text" id="fovYText" size="4" onchange="fovY = Number(this.value); updateTextBoxes();">
              </div> 
          </div>
        </p>
@@ -54,15 +54,15 @@
        <div class="clearfix">
          <div class="left-col">x-y:</div>
          <div class="right-col"> 
            <input type="range" name="stageVelocityInput" min="50" max="200" value="100" oninput="stageVelocity = Number(this.value); updateTextBoxes();">
            <input type="text" id="stageVelocityText" value="100" size="3" disabled>
            <input type="range" id="stageVelocityInput" min="50" max="200" oninput="stageVelocity = Number(this.value); updateTextBoxes();">
            <input type="text" id="stageVelocityText" size="3" disabled>
          </div>
        </div>
        <div class="clearfix">
          <div class="left-col">z:</div>
          <div class="right-col"> 
            <input type="range" name="focusVelocityInput" min="10" max="100" value="20" oninput="focusVelocity = Number(this.value); updateTextBoxes();">
            <input type="text" id="focusVelocityText" value="20" size="3" disabled>
            <input type="range" id="focusVelocityInput" min="10" max="100" oninput="focusVelocity = Number(this.value); updateTextBoxes();">
            <input type="text" id="focusVelocityText" size="3" disabled>
          </div>
        </div>