 spline.addEventListener('mousemove', function(e){
        var canvas_rect = spline.getBoundingClientRect();
           spline_draw(e.clientX - canvas_rect.left, e.clientY - canvas_rect.top, true);
           if(e.buttons == 1){
            spline_xs[spline_i] = client_to_x(e.clientX - canvas_rect.left);
            spline_ys[spline_i] = client_to_y(e.clientY - canvas_rect.top);
            spline_draw(e.clientX - canvas_rect.left, e.clientY - canvas_rect.top, false); // double work
           }
    }, fals