webdial

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

commit 88f5cbf28dc44180648ee40a8c9bc5ec076f074e
parent 3465a0e213d91dbec820f2ef46912b3cc8325890
Author: Sean Lynch <seanl@literati.org>
Date:   Wed,  7 Sep 2011 22:13:54 -0700

Swap x and y everywhere.

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

diff --git a/webdial.js b/webdial.js @@ -21,9 +21,9 @@ function WebDial(canvas) { ctx.beginPath(); var lastPoint = points[points.length-1]; console.debug(lon2x(lastPoint[1]), lat2y(lastPoint[0])); - ctx.moveTo(lon2x(lastPoint[0]), lat2y(lastPoint[1])); + ctx.moveTo(lon2x(lastPoint[1]), lat2y(lastPoint[0])); $.each(points, function(j, point) { - ctx.lineTo(lon2x(point[0]), lat2y(point[1])); + ctx.lineTo(lon2x(point[1]), lat2y(point[0])); }); ctx.fill(); });