From 4e974cd2f3a53533a4aea7d1fd2f6be02c65e7bb Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 4 Sep 2023 15:33:04 +0200 Subject: [PATCH] :bug: Fix typo on has-point? impl --- common/src/app/common/geom/shapes/intersect.cljc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/src/app/common/geom/shapes/intersect.cljc b/common/src/app/common/geom/shapes/intersect.cljc index b32196f44b..94c8bebdbd 100644 --- a/common/src/app/common/geom/shapes/intersect.cljc +++ b/common/src/app/common/geom/shapes/intersect.cljc @@ -343,12 +343,11 @@ (defn fast-has-point? [shape point] (let [x1 (dm/get-prop shape :x) - y1 (dm/get-prop shape :x) + y1 (dm/get-prop shape :y) x2 (+ x1 (dm/get-prop shape :width)) y2 (+ y1 (dm/get-prop shape :height)) px (dm/get-prop point :x) py (dm/get-prop point :y)] - (and (>= px x1) (<= px x2) (>= py y1)