From 648a8336d73ed4573f2242093b498d80eda2e3de Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 25 Mar 2015 10:29:41 +0100 Subject: [PATCH] re-introduce blinking iconAlert --- history.html | 19 +++++++++++++++++++ lib/map.js | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/history.html b/history.html index c45955f..8d53049 100644 --- a/history.html +++ b/history.html @@ -211,6 +211,25 @@ right: 0.5em; } + .map .node-alert { + -webkit-animation: blink 2s linear; + -webkit-animation-iteration-count: infinite; + animation: blink 2s linear; + animation-iteration-count: infinite; + } + + @-webkit-keyframes blink { + 0% { opacity: 1.0; } + 80% { opacity: 1.0; } + 90% { opacity: 0.0; } + } + + @keyframes blink { + 0% { opacity: 1.0; } + 80% { opacity: 1.0; } + 90% { opacity: 0.0; } + } + @media screen and (max-width: 80em) { .sidebar { font-size: 0.8em; diff --git a/lib/map.js b/lib/map.js index d44a639..35bf2ed 100644 --- a/lib/map.js +++ b/lib/map.js @@ -50,6 +50,7 @@ define(function () { var iconOnline = { color: "#1566A9", radius: 6, fillOpacity: 0.5, weight: 2, className: "stroke-first" } var iconOffline = { color: "#D43E2A", radius: 6, fillOpacity: 0.5, weight: 2, className: "stroke-first" } + var iconAlert = { color: "#D43E2A", radius: 6, fillOpacity: 0.5, weight: 2, className: "stroke-first node-alert" } var iconNew = { color: "#558020", radius: 6, fillOpacity: 0.5, weight: 2, className: "stroke-first" } var groupOnline, group @@ -87,6 +88,9 @@ define(function () { if (d.flags.online) return iconNew + if (d.lastseen.isAfter(moment(now).subtract(1, 'days'))) + return iconAlert + return iconOffline }, gotoAnything))