diff --git a/CHANGES.md b/CHANGES.md index 7585439d6c..ee9234f581 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,6 +32,7 @@ - Fix a regression with feedback form subject and content limits [Taiga #8908](https://tree.taiga.io/project/penpot/issue/8908) - Fix problem with stroke and filter ordering in frames [Github #5058](https://github.com/penpot/penpot/issues/5058) - Fix problem with hover layers when hidden/blocked [Github #5074](https://github.com/penpot/penpot/issues/5074) +- Fix problem with precision on boolean calculation [Taig #8482](https://tree.taiga.io/project/penpot/issue/8482) ## 2.2.1 diff --git a/common/src/app/common/geom/shapes/path.cljc b/common/src/app/common/geom/shapes/path.cljc index aaaf9dc3e8..c9863d9f3d 100644 --- a/common/src/app/common/geom/shapes/path.cljc +++ b/common/src/app/common/geom/shapes/path.cljc @@ -852,8 +852,10 @@ (defn ray-overlaps? [ray-point {selrect :selrect}] - (and (>= (:y ray-point) (:y1 selrect)) - (<= (:y ray-point) (:y2 selrect)))) + (and (or (> (:y ray-point) (:y1 selrect)) + (mth/almost-zero? (- (:y ray-point) (:y1 selrect)))) + (or (< (:y ray-point) (:y2 selrect)) + (mth/almost-zero? (- (:y ray-point) (:y2 selrect)))))) (defn content->geom-data [content]