diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-09 04:53:31 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-09 04:53:31 +0400 |
commit | e66925e70fdfc18f2655260cd9be05dbdddb26f7 (patch) | |
tree | 11401a664bd65cc01ee4543bf98d7b7dfdfe65be /plugins/UserCountryMap/javascripts/realtime-map.js | |
parent | 9ed0b711eb0ac58be3d51ae9408bb7f79e48601c (diff) |
Another attempt at getting realtime map screenshot tests to pass (using forceNowValue query param).
Diffstat (limited to 'plugins/UserCountryMap/javascripts/realtime-map.js')
-rw-r--r-- | plugins/UserCountryMap/javascripts/realtime-map.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/UserCountryMap/javascripts/realtime-map.js b/plugins/UserCountryMap/javascripts/realtime-map.js index f42a7aadef..bb260ef8a3 100644 --- a/plugins/UserCountryMap/javascripts/realtime-map.js +++ b/plugins/UserCountryMap/javascripts/realtime-map.js @@ -82,6 +82,7 @@ removeOldVisits = typeof config.removeOldVisits === 'undefined' ? true : config.removeOldVisits, doNotRefreshVisits = typeof config.doNotRefreshVisits === 'undefined' ? false : config.doNotRefreshVisits, enableAnimation = typeof config.enableAnimation === 'undefined' ? true : config.enableAnimation, + forceNowValue = typeof config.forceNowValue === 'undefined' ? false : +config.forceNowValue, width = main.width(), lastTimestamp = -1, lastVisits = [], @@ -180,7 +181,6 @@ function age(r) { var nowSecs = Math.floor(now); var o = (r.lastActionTimestamp - oldest) / (nowSecs - oldest); - o = Math.floor(o * 100) / 100; // normalize age for testing purposes return Math.min(1, Math.max(0, o)); } @@ -357,7 +357,7 @@ $('.realTimeMap_overlay .loading_data').hide(); // store current timestamp - now = new Date().getTime() / 1000; + now = forceNowValue || (new Date().getTime() / 1000); if (firstRun) { // if we run this the first time, we initialiize the map symbols visitSymbols = map.addSymbols({ |