From d2777f5915bce3715710b65023d12dac515edb9f Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 7 Jul 2021 16:30:57 +0200 Subject: [PATCH] :bug: Fix dynamic alignment enabled with hidden objects --- CHANGES.md | 2 ++ frontend/src/app/worker/snaps.cljs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 58c2f3df70..12dec0e1f9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -30,6 +30,8 @@ - Fix problem when editing color in group [Taiga #1816](https://tree.taiga.io/project/penpot/issue/1816) - Fix resize/rotate with mouse buttons different than left [#1060](https://github.com/penpot/penpot/issues/1060) - Fix header partialy visible on fullscreen viewer mode [Taiga #1875](https://tree.taiga.io/project/penpot/issue/1875) +- Fix dynamic alignment enabled with hidden objects [#1063](https://github.com/penpot/penpot/issues/1063) + ### :arrow_up: Deps updates ### :boom: Breaking changes diff --git a/frontend/src/app/worker/snaps.cljs b/frontend/src/app/worker/snaps.cljs index dadd825eef..a4926731b5 100644 --- a/frontend/src/app/worker/snaps.cljs +++ b/frontend/src/app/worker/snaps.cljs @@ -19,7 +19,7 @@ (defn process-shape [frame-id coord] (fn [shape] - (let [points (snap/shape-snap-points shape) + (let [points (when-not (:hidden shape) (snap/shape-snap-points shape)) shape-data (->> points (mapv #(vector % (:id shape))))] (if (= (:id shape) frame-id) (d/concat @@ -73,7 +73,7 @@ (d/mapm create-index shapes-data))) ;; Attributes that will change the values of their snap -(def snap-attrs [:x :y :width :height :selrect :grids]) +(def snap-attrs [:x :y :width :height :hidden :selrect :grids]) (defn- update-snap-data [snap-data old-objects new-objects]