mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
✨ Use positional constructor for matrix
This commit is contained in:
parent
3ab67e4545
commit
723aab6b80
1 changed files with 12 additions and 12 deletions
|
@ -417,21 +417,21 @@
|
|||
(.-f ^Matrix o))))
|
||||
:rfn (fn [rdr]
|
||||
(let [^List x (fres/read-object! rdr)]
|
||||
(map->Matrix {:a (.get x 0)
|
||||
:b (.get x 1)
|
||||
:c (.get x 2)
|
||||
:d (.get x 3)
|
||||
:e (.get x 4)
|
||||
:f (.get x 5)})))}))
|
||||
(pos->Matrix (.get x 0)
|
||||
(.get x 1)
|
||||
(.get x 2)
|
||||
(.get x 3)
|
||||
(.get x 4)
|
||||
(.get x 5))))}))
|
||||
|
||||
(t/add-handlers!
|
||||
{:id "matrix"
|
||||
:class Matrix
|
||||
:wfn #(into {} %)
|
||||
:rfn (fn [m]
|
||||
(map->Matrix {:a (get m :a)
|
||||
:b (get m :b)
|
||||
:c (get m :c)
|
||||
:d (get m :d)
|
||||
:e (get m :e)
|
||||
:f (get m :f)}))})
|
||||
(pos->Matrix (get m :a)
|
||||
(get m :b)
|
||||
(get m :c)
|
||||
(get m :d)
|
||||
(get m :e)
|
||||
(get m :f)))})
|
||||
|
|
Loading…
Reference in a new issue