From 36583d1171bd166c47cab21f18b7e7911d918d1a Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 3 Mar 2023 14:34:50 +0100 Subject: [PATCH] :bug: Allow selection of empty board by partial rect --- CHANGES.md | 1 + frontend/src/app/worker/selection.cljs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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]