more idiomatic variable names
[?]
Jul 13, 2022, 3:19 PM
EHSUSZMKVRSJ5HPJZQCKWFY3BRNLAIBDATSHDQ7AMJZ6SX2I6Z2ACDependencies
- [2]
P5QNVXSNdrop final mention of state global beyond main.lua - [3]
LF7BWEG4group all editor globals - [4]
UHB4GARJleft/right margin -> left/right coordinates - [5]
7SFHSB47rename - [6]
RT6EV6OPdelegate update events to drawings - [7]
JFFUF5ALoverride mouse state lookups in tests - [8]
KTZQ57HVreplace globals with args in a few functions - [9]
PJEQCTBLadd state arg to Drawing.update - [10]
DRFE3B3Zmouse buttons are integers, not strings - [11]
LAW2O3NWextract variable Margin_left - [*]
BLWAYPKVextract a module
Change contents
- replacement in drawing.lua at line 244
local x, y = App.mouse_x(), App.mouse_y()local pmx, pmy = App.mouse_x(), App.mouse_y() - replacement in drawing.lua at line 246
if Drawing.in_drawing(drawing, x,y, State.left,State.right) thenif Drawing.in_drawing(drawing, pmx,pmy, State.left,State.right) then - replacement in drawing.lua at line 250
local mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-drawing.y, State.width)local mx,my = Drawing.coord(pmx-State.left, State.width), Drawing.coord(pmy-drawing.y, State.width) - replacement in drawing.lua at line 257
if Drawing.in_drawing(drawing, x, y, State.left,State.right) thenlocal mx,my = Drawing.coord(x-State.left, State.width), Drawing.coord(y-drawing.y, State.width)if Drawing.in_drawing(drawing, pmx, pmy, State.left,State.right) thenlocal mx,my = Drawing.coord(pmx-State.left, State.width), Drawing.coord(pmy-drawing.y, State.width)