From de61bd564f1aa929bae414a70e421acd0b81789a Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 3 Feb 2020 23:45:23 +0100 Subject: [PATCH] OSM: comment a few spots in the javascript. --- gmap.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gmap.html b/gmap.html index 3b78a17..852c63d 100644 --- a/gmap.html +++ b/gmap.html @@ -56,10 +56,16 @@ if (invalt < 0) invalt = 0; b = parseInt(255/maxalt*invalt); + /* As Icon we use the plane emoji, this is a simple solution but + is definitely a compromise: we expect the icon to be rotated + 45 degrees facing north-east by default, this is true in most + systems but not all. */ var he = document.createElement("P"); he.innerHTML = '>'; var rotation = 45+360-plane.track; var selhtml = ''; + + /* Give a border to the selected plane. */ if (Selected == plane.hex) { selhtml = 'border:1px dotted #0000aa; border-radius:10px;'; } else { @@ -82,6 +88,8 @@ refreshSelectedInfo(); } + /* Return a closure to caputure the 'hex' argument. This way we don't + have to care about how Leaflet passes the object to the callback. */ function selectPlaneCallback(hex) { return function() { return selectPlane(hex);