fix: premature thumbnail hiding during drag seeking

This commit is contained in:
tomasklaen
2023-03-29 23:13:51 +02:00
parent 21b37ce33b
commit 19f421f67c
2 changed files with 33 additions and 14 deletions

View File

@@ -93,6 +93,13 @@ function get_point_to_rectangle_proximity(point, rect)
return math.sqrt(dx * dx + dy * dy)
end
---@param point_a {x: number; y: number}
---@param point_b {x: number; y: number}
function get_point_to_point_proximity(point_a, point_b)
local dx, dy = point_a.x - point_b.x, point_a.y - point_b.y
return math.sqrt(dx * dx + dy * dy)
end
-- Call function with args if it exists
function call_maybe(fn, ...)
if type(fn) == 'function' then fn(...) end