🐛 Fix dynamic alignment enabled with hidden objects

This commit is contained in:
alonso.torres 2021-07-07 16:30:57 +02:00 committed by Andrés Moya
parent 9b878bd1cc
commit d2777f5915
2 changed files with 4 additions and 2 deletions

View file

@ -30,6 +30,8 @@
- Fix problem when editing color in group [Taiga #1816](https://tree.taiga.io/project/penpot/issue/1816) - 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 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 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 ### :arrow_up: Deps updates
### :boom: Breaking changes ### :boom: Breaking changes

View file

@ -19,7 +19,7 @@
(defn process-shape [frame-id coord] (defn process-shape [frame-id coord]
(fn [shape] (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))))] shape-data (->> points (mapv #(vector % (:id shape))))]
(if (= (:id shape) frame-id) (if (= (:id shape) frame-id)
(d/concat (d/concat
@ -73,7 +73,7 @@
(d/mapm create-index shapes-data))) (d/mapm create-index shapes-data)))
;; Attributes that will change the values of their snap ;; 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 (defn- update-snap-data
[snap-data old-objects new-objects] [snap-data old-objects new-objects]