From aa7ff184a2890490f83e20f01f4d795d83d3d60f Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 6 Feb 2024 14:04:29 +0100 Subject: [PATCH] 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. --- online-editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/online-editor.js b/online-editor.js index aa166a9..99fb540 100644 --- a/online-editor.js +++ b/online-editor.js @@ -320,8 +320,8 @@ function besRenderPopup(matches, popup, clientX, clientY) { function besIsPointInRect(x, y, rect) { return ( x >= rect.x && - x <= rect.x + rect.width && + x < rect.x + rect.width && y >= rect.y && - y <= rect.y + rect.height + y < rect.y + rect.height ) }