From f276910ce3f10c8b81cd2c37ae3fbca8de90a47f Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 27 Oct 2022 11:58:28 +0200 Subject: [PATCH] :bug: fix bad behaviour on hovering and click nested artboards --- CHANGES.md | 1 + common/src/app/common/types/shape_tree.cljc | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 301fc7d29..0b2a3e964 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -15,6 +15,7 @@ - Fix join nodes icon is active when 2 already joined nodes are selected [Taiga #4370](https://tree.taiga.io/project/penpot/issue/4370) - Fix path nodes panel. "To curve" and "To corner" icons are active if node is already curved/cornered [Taiga #4371](https://tree.taiga.io/project/penpot/issue/4371) - Fix displaying comments settings are not applied via "Comments" menu drop-down on the top navbar on view mode [Taiga #4389](https://tree.taiga.io/project/penpot/issue/4389) +- Fix bad behaviour on hovering and click nested artboards[Taiga #4018](https://tree.taiga.io/project/penpot/issue/4018) and [Taiga #4269](https://tree.taiga.io/project/penpot/us/4269) ## 1.16.0-beta diff --git a/common/src/app/common/types/shape_tree.cljc b/common/src/app/common/types/shape_tree.cljc index 633e757a4..e0bcc9994 100644 --- a/common/src/app/common/types/shape_tree.cljc +++ b/common/src/app/common/types/shape_tree.cljc @@ -183,11 +183,11 @@ (let [type-a (dm/get-in objects [id-a :type]) type-b (dm/get-in objects [id-b :type])] (cond - (and bottom-frames? (= :frame type-a) (not= :frame type-b)) - 1 + (and (= :frame type-a) (not= :frame type-b)) + (if bottom-frames? 1 -1) - (and bottom-frames? (not= :frame type-a) (= :frame type-b)) - -1 + (and (not= :frame type-a) (= :frame type-b)) + (if bottom-frames? -1 1) (= id-a id-b) 0