Skip to content
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.

Commit

Permalink
make variable blinkingHours configurable
Browse files Browse the repository at this point in the history
close ffnord#18
  • Loading branch information
PetaByteBoy committed Nov 24, 2015
1 parent 5f6708c commit e079139
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"mapSigmaScale": 0.5,
"showContact": true,
"maxAge": 14,
"blinkingHours": 8,
"mapLayers": [
{ "name": "MapQuest",
"url": "https://otile{s}-s.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg",
Expand Down
4 changes: 1 addition & 3 deletions lib/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ define(["map/clientlayer", "map/labelslayer",
"d3", "leaflet", "moment", "locationmarker", "rbush",
"leaflet.label", "leaflet.providers"],
function (ClientLayer, LabelsLayer, d3, L, moment, LocationMarker, rbush) {
var blinkingHours = 8

var options = { worldCopyJump: true,
zoomControl: false
}
Expand Down Expand Up @@ -455,7 +453,7 @@ define(["map/clientlayer", "map/labelslayer",

var markersLost = data.nodes.lost.filter(has_location)
.map(mkMarker(nodeDict, function (d) {
if (d.lastseen.isAfter(moment(data.now).subtract(blinkingHours, "hours")))
if (d.lastseen.isAfter(moment(data.now).subtract(config.blinkingHours, "hours")))
return iconAlert

return iconLost
Expand Down

0 comments on commit e079139

Please sign in to comment.