From 3b1f2cf9def925619b109fb969aff82fede09cfd Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 13 Jul 2022 08:19:58 -0700 Subject: use available variables --- drawing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drawing.lua') diff --git a/drawing.lua b/drawing.lua index 6833763..664bf6c 100644 --- a/drawing.lua +++ b/drawing.lua @@ -245,7 +245,7 @@ function Drawing.update(State) if App.mouse_down(1) then if Drawing.in_drawing(drawing, pmx,pmy, State.left,State.right) then if drawing.pending.mode == 'freehand' then - table.insert(drawing.pending.points, {x=Drawing.coord(App.mouse_x()-State.left, State.width), y=Drawing.coord(App.mouse_y()-drawing.y, State.width)}) + table.insert(drawing.pending.points, {x=Drawing.coord(pmx-State.left, State.width), y=Drawing.coord(pmy-drawing.y, State.width)}) elseif drawing.pending.mode == 'move' then local mx,my = Drawing.coord(pmx-State.left, State.width), Drawing.coord(pmy-drawing.y, State.width) drawing.pending.target_point.x = mx -- cgit 1.4.1-2-gfad0