From 3e819d481eb8392eaeb4d636322ede2a66f67956 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 18 Apr 2023 23:45:03 -0700 Subject: [PATCH] typo bugfix --- 0026-on.draw | 6 ------ 0040-A1 | 7 ------- 0051-intersect_with_centroid | 4 ++-- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/0026-on.draw b/0026-on.draw index 6d33151..7a2d2f7 100644 --- a/0026-on.draw +++ b/0026-on.draw @@ -23,12 +23,6 @@ on.draw = function() end end if Edge then - App.color{r=0,g=0,b=1} - if Edge.s.debug_info then - for _,p in ipairs(Edge.s.debug_info) do - love.graphics.circle('line', vx(p.sx), vy(p.sy), 5) - end - end App.color{r=0,g=0,b=0} love.graphics.line(vx(Edge.s.sx),vy(Edge.s.sy), vx(Edge.e.sx),vy(Edge.e.sy)) love.graphics.circle('fill', vx(Edge.s.sx),vy(Edge.s.sy), 5) diff --git a/0040-A1 b/0040-A1 index d66f7c4..05cb335 100644 --- a/0040-A1 +++ b/0040-A1 @@ -5,13 +5,6 @@ A1 = function(id, preserve_screen_top_of_cursor_node) -- delete previously added shapes for this node: for i=#Surface,1,-1 do local x = Surface[i] - if x.id then print(x.id, x.type) - elseif x.keys then - print('keys', x.type) - for _,k in ipairs(x.keys) do - print('', k) - end - end if x.id == id or (x.keys and table.find(x.keys, id)) then table.remove(Surface, i) end diff --git a/0051-intersect_with_centroid b/0051-intersect_with_centroid index 0615fb5..fef54a0 100644 --- a/0051-intersect_with_centroid +++ b/0051-intersect_with_centroid @@ -4,11 +4,11 @@ intersect_with_centroid = function(node, sx,sy) -- collect nearest intersection with all 4 boundaries local candidates = {} local y = y_at_x(sx,sy, c.sx,c.sy, node.x-10) - if y and y >= node.y-10 and y < node.x+h+10 then + if y and y >= node.y-10 and y < node.y+h+10 then table.insert(candidates, {sx=node.x-10, sy=y}) end y = y_at_x(sx,sy, c.sx,c.sy, node.x+node.w+10) - if y and y >= node.y-10 and y < node.x+h+10 then + if y and y >= node.y-10 and y < node.y+h+10 then table.insert(candidates, {sx=node.x+node.w+10, sy=y}) end local x = x_at_y(sx,sy, c.sx,c.sy, node.y-10)