Fix right&bottom edge of point-in-rect test

x==0 and width==100 means the rectangle spans from 0 to 99. 100 is not
part of the rectangle anymore.
This commit is contained in:
Simon Rozman 2024-02-06 14:04:29 +01:00
parent c14294d80d
commit aa7ff184a2

View File

@ -320,8 +320,8 @@ function besRenderPopup(matches, popup, clientX, clientY) {
function besIsPointInRect(x, y, rect) { function besIsPointInRect(x, y, rect) {
return ( return (
x >= rect.x && x >= rect.x &&
x <= rect.x + rect.width && x < rect.x + rect.width &&
y >= rect.y && y >= rect.y &&
y <= rect.y + rect.height y < rect.y + rect.height
) )
} }