add link amp mod range calculation to portal range

(it involves some guessing, as only 'rare' ones have been seen so far)
alternative to #392
part of #374
This commit is contained in:
Jon Atkins
2013-06-26 21:53:02 +01:00
parent ab3bdcef30
commit c552742def
2 changed files with 30 additions and 3 deletions

View File

@ -8,8 +8,8 @@ window.getRangeText = function(d) {
return ['range',
'<a onclick="window.rangeLinkClick()">'
+ (range > 1000
? Math.round(range/1000) + ' km'
: Math.round(range) + ' m')
? Math.floor(range/1000) + ' km'
: Math.floor(range) + ' m')
+ '</a>'];
}