Parcourir la source

Fix scaling factors

master
Adrian Short il y a 11 ans
Parent
révision
0c22e283bf
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. +3
    -2
      app/helpers/posts_helper.rb

+ 3
- 2
app/helpers/posts_helper.rb Voir le fichier

@@ -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,


Chargement…
Annuler
Enregistrer