Permalink
Browse files

very messy fix for sample height adjustment

  • Loading branch information...
1 parent e840f01 commit fbfa7b3cedcffffc405004bf645ac79b0672c4b0 @jywarren committed Oct 26, 2012
Showing with 5 additions and 2 deletions.
  1. +3 −2 webserver/app/views/capture/_configure.html.erb
  2. +2 −0 webserver/public/javascripts/capture.js
@@ -24,9 +24,10 @@
<p><i>This panel is under construction</i></p>
- <label for="samplerow-slider">Input slider:</label>
- <input type="range" name="samplerow-slider" id="samplerow-slider" value="240" min="0" max="480" onChange="$W.setSampleRows(parseInt($('#samplerow-slider').val()),parseInt($('#samplerow-slider').val())+40)"/>
+ <label for="samplerow-slider">Sample row height (zero = top):</label>
+ <input type="range" name="samplerow-slider" id="samplerow-slider" value="240" min="0" max="480" onChange="$W.setSampleRows(parseInt($('#samplerow-slider').val()),parseInt($('#samplerow-slider').val())+40);$('#heightIndicator')[0].style.height = parseInt(($('#samplerow-slider').val()/480)*280)+'px';"/>
+ <div id="heightIndicator" style="position:absolute;z-index:999;opacity:0.4;background:black;height:120px;width:320px;"></div>
<div id="webcam"></div>
<a data-role="button" data-theme="a" href="#capture" data-panel="main">&laquo; Back</a>
</div>
@@ -55,6 +55,8 @@ $W = {
this.sample_height = this.sample_end_row - this.sample_start_row // how many pixels to sample
setInterval($W.alert_overexposure,3000)
$W.data = [{label: "webcam",data:[]}]
+ $('video')[0].width = "320"
+ $('video')[0].height = "280"
},
success: function (stream) {
//console.log('success')

0 comments on commit fbfa7b3

Please sign in to comment.