mirror of
https://github.com/penpot/penpot.git
synced 2025-05-06 00:35:54 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
2ee15c3147
1 changed files with 6 additions and 2 deletions
|
@ -21,7 +21,8 @@
|
||||||
"Adjust modifiers so they adjust to the pixel grid"
|
"Adjust modifiers so they adjust to the pixel grid"
|
||||||
[modifiers shape]
|
[modifiers shape]
|
||||||
|
|
||||||
(if (some? (:resize-transform modifiers))
|
(if (and (some? (:resize-transform modifiers))
|
||||||
|
(not (gmt/unit? (:resize-transform modifiers))))
|
||||||
;; If we're working with a rotation we don't handle pixel precision because
|
;; If we're working with a rotation we don't handle pixel precision because
|
||||||
;; the transformation won't have the precision anyway
|
;; the transformation won't have the precision anyway
|
||||||
modifiers
|
modifiers
|
||||||
|
@ -243,7 +244,10 @@
|
||||||
|
|
||||||
(let [set-modifiers
|
(let [set-modifiers
|
||||||
(fn [modif-tree id]
|
(fn [modif-tree id]
|
||||||
(assoc modif-tree id {:modifiers (get-modifier (get objects id))}))
|
(let [shape (get objects id)
|
||||||
|
modifiers (cond-> (get-modifier shape) snap-pixel? (set-pixel-precision shape))]
|
||||||
|
(-> modif-tree
|
||||||
|
(assoc id {:modifiers modifiers}))))
|
||||||
|
|
||||||
modif-tree (reduce set-modifiers {} ids)
|
modif-tree (reduce set-modifiers {} ids)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue