Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #37 from sanger/next_release
Browse files Browse the repository at this point in the history
Release-1.10.01
  • Loading branch information
JamesGlover authored Apr 3, 2017
2 parents 27c19b3 + a61526e commit e948c6e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/models/forms/tagging_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ def base_layout
def offsets
last_filled_well = index_by_column_of(filled_wells_in_column_order.last)
first_filled_well = index_by_column_of(filled_wells_in_column_order.first)
(first_filled_well..95-last_filled_well).map{|i| [well_location_by_column[i],i-first_filled_well]}
max_offset = 96 - last_filled_well
Array.new(max_offset) do |i|
[well_location_by_column[i + first_filled_well], i]
end
end


def tag_range
(0...tag_end).map{|i| [i+1,i]}
(0...tag_end).map { |i| [i + 1, i] }
end

def tag_end
Expand All @@ -76,7 +78,9 @@ def tag_end
private :tag_end

def filled_wells_in_column_order
@wells_in_column_order ||= filled_wells.sort {|w,w2| index_by_column_of(w) <=> index_by_column_of(w2) }
@wells_in_column_order ||= filled_wells.sort do |w,w2|
index_by_column_of(w) <=> index_by_column_of(w2)
end
end
private :filled_wells_in_column_order

Expand Down

0 comments on commit e948c6e

Please sign in to comment.