2y(sy)];
		if(document.getElementById("a_1").checked) { // add
			points.push(xy);
			points_i = points.length-1;
		} else { // move
			points_i = nearest_i(xy, points);
			points[points_i] = xy;
		}
		draw_canvas();
		i_canvas.releasePointerCapture(e.pointerId);
	}, false);

	i_canvas.addEventListener('pointerleave', function(e) {
		draw_canvas();
	}, false);

	function redraw() {
		draw_canvas();
		setTimeout(redraw, 200);
	}
	if(i_do_timed_sync)
		redraw();
	else
		draw_canvas();
}

function pretty_print