Browse Source

Fix scaling factors

master
Adrian Short 11 years ago
parent
commit
0c22e283bf
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      app/helpers/posts_helper.rb

+ 3
- 2
app/helpers/posts_helper.rb View File

@@ -8,9 +8,10 @@ module PostsHelper
image_url = subscription.layer.icon_url
end

distance = post.distance.to_i
scale = 1.0
scale = 2.0 if post.distance < 50
scale = post.distance / 1000 if post.distance > 1000
scale = 0.5 if distance < 100.0
scale = distance / 1000.0 if distance > 1000.0

res = {
:id => post.id,


Loading…
Cancel
Save