0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

🐛 Fix clipped elements affect artboards centering

This commit is contained in:
Alejandro Alonso 2022-08-03 12:48:48 +02:00
parent b926409fa2
commit 9ffd00d821
2 changed files with 17 additions and 15 deletions

View file

@ -34,6 +34,7 @@
### :bug: Bugs fixed
- Fix clipped elements affect boards and centering [Taiga #3666](https://tree.taiga.io/project/penpot/issue/3666)
- Fix intro action in multi input [Taiga #3541](https://tree.taiga.io/project/penpot/issue/3541)
- Fix team default image [Taiga #3919](https://tree.taiga.io/project/penpot/issue/3919)
- Fix problem with group coordinates [#2008](https://github.com/penpot/penpot/issues/2008)

View file

@ -129,26 +129,27 @@
(-> (get-shape-filter-bounds shape)
(add-padding (calculate-padding shape true))))
bounds
(cph/reduce-objects
objects
(fn [shape]
(and (d/not-empty? (:shapes shape))
(or (not (cph/frame-shape? shape))
(:show-content shape))
bounds (if (cph/frame-shape? shape)
[(calculate-base-bounds shape)]
(cph/reduce-objects
objects
(fn [shape]
(and (d/not-empty? (:shapes shape))
(or (not (cph/frame-shape? shape))
(:show-content shape))
(or (not (cph/group-shape? shape))
(not (:masked-group? shape)))))
(or (not (cph/group-shape? shape))
(not (:masked-group? shape)))))
(:id shape)
(:id shape)
(fn [result shape]
(conj result (get-object-bounds objects shape)))
(fn [result shape]
(conj result (get-object-bounds objects shape)))
[(calculate-base-bounds shape)])
[(calculate-base-bounds shape)]))
children-bounds (or (:children-bounds shape) (gsr/join-selrects bounds))
children-bounds (cond->> (gsr/join-selrects bounds)
(not (cph/frame-shape? shape)) (or (:children-bounds shape)))
filters (shape->filters shape)
blur-value (or (-> shape :blur :value) 0)]