webdial

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

commit 77c369498e1a3af501e3bb2c1066475d4f54d6e0
parent 9baa6856a390786a88ec6d433cf3a00f571ee927
Author: Sean Lynch <seanl@literati.org>
Date:   Wed,  7 Sep 2011 22:19:10 -0700

Don't use bogus width and height for scaling.

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

diff --git a/webdial.js b/webdial.js @@ -2,14 +2,12 @@ function WebDial(canvas) { var continents; function drawMap() { - var w = canvas.width(); - var h = canvas.height(); function lon2x(lon) { - return Math.round((lon + 180.0) * w / 360.0); + return (lon + 180.0); } function lat2y(lat) { - return Math.round((90.0 - lat) * h / 180.0); + return (90.0 - lat); } var ctx = canvas[0].getContext("2d");