Permalink
Browse files

disabled live auto-flipping

  • Loading branch information...
1 parent 896266b commit b496944c80536fd3173f94c26fb3f044a8a41882 @jywarren committed Jan 25, 2013
@@ -317,4 +317,10 @@ def has_tag(name)
!Tag.find_by_name(name,:conditions => {:spectrum_id => self.id}).nil?
end
+ # if it has horizontally flipped input image: red is at left
+ def is_flipped
+ d = ActiveSupport::JSON.decode(self.data)
+ d['lines'][0]['wavelength'] < d['lines'][d['lines'].length-1]['wavelength']
+ end
+
end
@@ -12,8 +12,6 @@
<input data-theme="a" type="checkbox" name="geotag-toggle" id="geotag-toggle" type="checkbox" />
<label for="rgb-toggle">RGB</label>
<input data-theme="a" type="checkbox" name="rgb-toggle" id="rgb-toggle" onChange="$W.toggle_mode()" />
- <label for="flip-toggle">Autoflip</label>
- <input checked=true data-theme="a" type="checkbox" name="flip-toggle" id="flip-toggle" onChange="$W.toggle_flip()" />
</fieldset>
</div>
<div data-role="collapsible-set" style="padding:8px;">
@@ -22,6 +20,7 @@
<a data-role="button" data-theme="a" onClick="$W.mark()">Mark wavelength</a>
<a data-role="button" data-theme="a" href="#search">Compare</a>
<a data-role="button" data-theme="a" href="#macros">Macros</a>
+ <a data-role="button" data-theme="a" onClick="$W.flipped = !$W.flipped">Flip video horizontally</a>
</div>
</div>
@@ -37,6 +37,7 @@ flotoptions.colors = [ "#ccc", "#E02130", "#FAB243", "#429867", "#2B5166" ]//, "
(function () {
$W.initialize({
calibrated:<%= !@calibration.nil? %>,
+ flipped:<%= @calibration.is_flipped %>,
mobile:false
})
setInterval($W.getRow,100)
@@ -21,7 +21,7 @@
<hr />
<p><strong>Subscribe to the "plots-spectrometry" mailing list</strong> for support, discussion, and to share your work:</p>
-<form class="form" action="http://groups.google.com/group/plots-boston/boxsubscribe"><input type=text name=email /><br /> <input class="btn btn-primary" type=submit name="sub" value="Subscribe" /></form>
+<form class="form" action="http://groups.google.com/group/plots-spectrometry/boxsubscribe"><input type=text name=email /><br /> <input class="btn btn-primary" type=submit name="sub" value="Subscribe" /></form>
<hr />
<h3>Recent comments <small>(<a href="/comments">view all</a>)</small></h3>
@@ -9,7 +9,7 @@ $W = {
baseline: null,
full_data: [],
unflipped_data: [],
- detect_flip: true,
+ detect_flip: false,
flipped: false,
mode: "average",
pos: 0,
@@ -26,6 +26,7 @@ $W = {
initialize: function(args) {
this.mobile = args['mobile'] || false
+ this.flipped = args['flipped'] || false
this.interface = args['interface'] || false
this.calibrated = args['calibrated'] || false
if (args['height']) {

0 comments on commit b496944

Please sign in to comment.