mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
🐛 On a variants switch, keep the value of the rotation and its transformations (#7165)
This commit is contained in:
parent
0e4cf23a93
commit
7023880e67
@ -2020,7 +2020,6 @@
|
||||
skip-operations? (or skip-operations?
|
||||
(= attr-val (get current-shape attr)))
|
||||
|
||||
|
||||
;; On a text-change, we want to force a position-data reset
|
||||
;; so it's calculated again
|
||||
[roperations uoperations]
|
||||
@ -2028,6 +2027,16 @@
|
||||
(add-update-attr-operations :position-data current-shape roperations uoperations nil)
|
||||
[roperations uoperations])
|
||||
|
||||
;; On a rotation operation we need to keep also the transformation matrixes
|
||||
[roperations uoperations]
|
||||
(if (and (not skip-operations?) (= attr :rotation))
|
||||
(let [[roperations uoperations]
|
||||
(add-update-attr-operations
|
||||
:transform current-shape roperations uoperations (:transform previous-shape))]
|
||||
(add-update-attr-operations
|
||||
:transform-inverse current-shape roperations uoperations (:transform-inverse previous-shape)))
|
||||
[roperations uoperations])
|
||||
|
||||
[roperations' uoperations']
|
||||
(if skip-operations?
|
||||
[roperations uoperations]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user