Permalink
Browse files

close #77 and set 50% opacity background as default

  • Loading branch information...
1 parent 03fa4b7 commit f7e67f12cf99a15d107f239034014d18f3b18647 @jywarren committed Jan 2, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 app/models/map.rb
  2. +1 −1 public/knitter.js
View
@@ -116,14 +116,15 @@ def best_cm_per_pixel
def average_cm_per_pixel
scales = []
count = 0
+ average = 0
self.warpables.each do |warpable|
unless warpable.width.nil?
count += 1
res = warpable.cm_per_pixel
scales << res unless res == nil
end
end
- average = (scales.inject {|sum, n| sum + n })/count
+ average = (scales.inject {|sum, n| sum + n })/count if scales
puts 'average scale = '+average.to_s+' cm/px'
average
end
View
@@ -254,7 +254,7 @@ var Knitter = {
})
},
- background_transparent: false,
+ background_transparent: true,
toggle_background: function() {
if (Knitter.background_transparent) {
$('map').removeClassName('transparent');

0 comments on commit f7e67f1

Please sign in to comment.