#12 Make icon transparent if there is no data update
This commit is contained in:
parent
7924214b66
commit
51689abb64
@ -2,7 +2,7 @@
|
||||
|
||||
## 1.2.8
|
||||
### New Features
|
||||
*
|
||||
* #12 Make icon transparent if there is no data update
|
||||
### Bugfixes
|
||||
* Implement #13 fixing issue with port when using proxy
|
||||
* Implement #14 show description on map in tooltip on area
|
||||
|
@ -58,6 +58,18 @@ function parseAjaxLoc() {
|
||||
}
|
||||
}
|
||||
}
|
||||
var lasttime = timeCalculation(positionItem['Recievedtime'], "diffraw");
|
||||
if (lasttime <= 5 * 60) {
|
||||
markers[key]._icon.style.opacity = 1;
|
||||
} else if (lasttime > 5 * 60 && lasttime <= 15 * 60) {
|
||||
markers[key]._icon.style.opacity = 0.9 - (((lasttime - (5 * 60)) / ((15 * 60) - (5 * 60))) * (0.9 - 0.7));
|
||||
} else if (lasttime > 15 * 60 && lasttime <= 30 * 60) {
|
||||
markers[key]._icon.style.opacity = 0.7 - (((lasttime - (15 * 60)) / ((30 * 60) - (15 * 60))) * (0.7 - 0.5));
|
||||
} else if (lasttime > 30 * 60 && lasttime <= 60 * 60) {
|
||||
markers[key]._icon.style.opacity = 0.5 - (((lasttime - (30 * 60)) / ((30 * 60) - (30 * 60))) * (0.5 - 0.25));
|
||||
} else if (lasttime > 60 * 60) {
|
||||
markers[key]._icon.style.opacity = 0.25;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user