diff --git a/CHANGES.md b/CHANGES.md index bb0184553..3a6c4d33d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ - Fix error streen when uploading wrong SVG [#2995](https://github.com/penpot/penpot/issues/2995) - Fix selecting children from hidden parent layers [Taiga #4934](https://tree.taiga.io/project/penpot/issue/4934) - Fix problem when undoing multiple selected colors [Taiga #4920](https://tree.taiga.io/project/penpot/issue/4920) +- Allow selection of empty board by partial rect [Taiga #4806](https://tree.taiga.io/project/penpot/issue/4806) ### :arrow_up: Deps updates diff --git a/frontend/src/app/worker/selection.cljs b/frontend/src/app/worker/selection.cljs index 1d592c7f9..45731aa8c 100644 --- a/frontend/src/app/worker/selection.cljs +++ b/frontend/src/app/worker/selection.cljs @@ -131,7 +131,10 @@ (or (not full-frame?) (not= :frame (:type shape)) - (gsh/rect-contains-shape? rect shape)))) + (and (d/not-empty? (:shapes shape)) + (gsh/rect-contains-shape? rect shape)) + (and (empty? (:shapes shape)) + (gsh/overlaps? shape rect))1))) overlaps? (fn [shape]