webdial

Incomplete JS port of moondial.
git clone https://code.literati.org/webdial.git
Log | Files | Refs

commit a79413f280427e08ee11f0b61eaac9c370d1c8d2
parent ba11f9908cd7036313ce4750b7c488ea68f68a1f
Author: Sean Lynch <seanl@literati.org>
Date:   Thu,  8 Sep 2011 20:22:08 -0700

Fixes

Diffstat:
Mwebdial.js | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/webdial.js b/webdial.js @@ -13,12 +13,12 @@ function WebDial(canvas) { ctx.fill(); } - function drawMap(ctx, w, h) { + function drawMap(ctx, lon2x, lat2y) { ctx.fillStyle = "rgb(0, 192, 0)"; $.each(continents, function(continent, polygons) { console.debug("Drawing", continent); $.each(polygons, function(i, points) { - drawPoly(ctx, w, h, points); + drawPoly(ctx, lon2x, lat2y, points); }); }); } @@ -42,10 +42,10 @@ function WebDial(canvas) { geometric_lon, "equ:", equ, "geo:", geo, "st:", st); drawSun(ctx, lon2x(geo.longitude), lat2y(geo.latitude)); var points = sun.terminator(geo.latitude, geo.longitude, - sun.sun_rst_altitude, w, h); + sun.sun_rst_altitude); console.debug(points); ctx.fillStyle = "rgba(0, 0, 0, 0.25)"; - drawPoly(ctx, w, h, points); + drawPoly(ctx, lon2x, lat2y, points); } function draw() {