From e88d6d88a86fdb01a4eb47e22df1af5a1b891dd8 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 15 Dec 2022 10:10:04 +0100 Subject: [PATCH 1/2] :bug: Fix strage cursor behaviour after clicking viewport with text pool --- CHANGES.md | 1 + common/src/app/common/geom/shapes/text.cljc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 1eef88e810..e63cb260c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ # CHANGELOG ## 1.16.2-beta +- Fix strage cursor behaviour after clicking viewport with text pool [Github #2447](https://github.com/penpot/penpot/issues/2447) ## 1.16.1-beta diff --git a/common/src/app/common/geom/shapes/text.cljc b/common/src/app/common/geom/shapes/text.cljc index 992f3c0926..a160eb85e9 100644 --- a/common/src/app/common/geom/shapes/text.cljc +++ b/common/src/app/common/geom/shapes/text.cljc @@ -22,7 +22,9 @@ (let [points (->> shape :position-data (mapcat (comp gpr/rect->points position-data->rect)))] - (-> points (gpr/points->selrect)))) + (if (empty? points) + (:selrect shape) + (-> points (gpr/points->selrect))))) (defn position-data-bounding-box [shape] From 5605ac2769b7700fb838311cb06442b71e1ecdf4 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 16 Dec 2022 10:28:28 +0100 Subject: [PATCH 2/2] :paperclip: Increment version number. --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 00ff58a87e..164087cf88 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.16.1-beta +1.16.2-beta