瀏覽代碼

Fix scaling factors

master
Adrian Short 11 年之前
父節點
當前提交
0c22e283bf
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      app/helpers/posts_helper.rb

+ 3
- 2
app/helpers/posts_helper.rb 查看文件

@@ -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…
取消
儲存