diff --git a/CHANGES.md b/CHANGES.md index 58c2f3df7..12dec0e1f 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 dadd825ee..a4926731b 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]