bugfix
This commit is contained in:
parent
dc1f74b490
commit
ff1d4d988a
3
main.lua
3
main.lua
|
@ -721,7 +721,7 @@ end
|
||||||
function contains_point(shape, p)
|
function contains_point(shape, p)
|
||||||
if shape.mode == 'freehand' then
|
if shape.mode == 'freehand' then
|
||||||
-- not supported
|
-- not supported
|
||||||
elseif shape.mode == 'line' then
|
elseif shape.mode == 'line' or shape.mode == 'manhattan' then
|
||||||
return shape.p1 == p or shape.p2 == p
|
return shape.p1 == p or shape.p2 == p
|
||||||
elseif shape.mode == 'polygon' then
|
elseif shape.mode == 'polygon' then
|
||||||
return table.find(shape.vertices, p)
|
return table.find(shape.vertices, p)
|
||||||
|
@ -733,6 +733,7 @@ function contains_point(shape, p)
|
||||||
elseif shape.mode == 'deleted' then
|
elseif shape.mode == 'deleted' then
|
||||||
-- already done
|
-- already done
|
||||||
else
|
else
|
||||||
|
print(shape.mode)
|
||||||
assert(false)
|
assert(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue