In the process we're now using sx,sy consistently everywhere. That's a sign this is on the right track.
VEVJJKOCDIODY35MQDZFZU7R77IIGIL7HWMEPZ6J5F2BJFGCP4RQC
7OUKVXJTWEJBYNBPB2SBXJ4ADFZ7OV4SJEG4K2A3J4D7FSJAJ52QC
7UWLGLA6FAO42YN6IBEFAKMTDUY26IJAQDBHGHHH55OK2SHUIZHAC
ZQMQVMFWZIGWBRCB455IKHPTAOUYPLYCSC44NBPPET557RGVRX3AC
3GK7GC2WTTU4K76MD7DN6W4UPSFTYSEJMTGG4P7ADEHLH6K3P4IQC
FBDRJ53NJ5BWDQGU2GWZ6NEYHKCCRD7RODMIG7QQZBRFUB4HR7OAC
if on_move_bar(sx, sy) then
if Move_node then Move_node.x = sx - Move.sx Move_node.y = sy - Move.sy B() elseif Resize_node then Resize_node.width = sx - Resize.sx A() elseif on_move_bar(sx, sy) then
if Move_node then
Move_node.x = sx - Move.sx
Move_node.y = sy - Move.sy
B()
elseif Resize_node then
Resize_node.width = sx - Resize.sx
A()
elseif on_move_bar(sx, sy) then
Resize_node.width = Resize_node.width + (x - Resize.x)/Viewport.zoom A()
Resize_node.width = Resize_node.width + (x - Resize.x)/Viewport.zoom
Move_node.x = Move_node.x + (x - Move.x)/Viewport.zoom Move_node.y = Move_node.y + (y - Move.y)/Viewport.zoom A()
Move_node.x = Move_node.x + (x - Move.x)/Viewport.zoom
Move_node.y = Move_node.y + (y - Move.y)/Viewport.zoom
Move = {x=x, y=y}
Move = {sx=sx-Move_node.x, sy=sy-Move_node.y}
Resize = {x=x, y=y}
Resize = {sx=sx-Resize_node.width}