publiclab/spectral-workbench

View on GitHub
app/views/embed/set.html.erb

Summary

Maintainability
Test Coverage
<%= render partial: "embed/modal", locals: { datum: @set, type: :set } %>

<div id="graphing" class="swb-graphing sets embed">
  <div id="graph"><i class="fa fa-spinner fa-spin"></i></div>

  <script type="text/javascript">

    var graph;
    jQuery(document).ready(function($) {
      graph = new SpectralWorkbench.Graph({
        set_id: <%= @set.id %>,
        embed: true,
        calibrated: <%= @set.some_calibrated %>
      });
    })

  </script>
  
  <%= render :partial => "graph/header", :locals => {:type => :set, :datum => @set } %>

  <%= render partial: 'graph/spectra', locals: { datum: @set, spectrums: @spectrums } %>
   
  <div class="toolbar toolbar-bottom">
    <%= render :partial => 'graph/tools', :locals => { type: :set, datum: @set } %>
  </div>
  
</div>