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))))
|
(.-f ^Matrix o))))
|
||||||
:rfn (fn [rdr]
|
:rfn (fn [rdr]
|
||||||
(let [^List x (fres/read-object! rdr)]
|
(let [^List x (fres/read-object! rdr)]
|
||||||
(map->Matrix {:a (.get x 0)
|
(pos->Matrix (.get x 0)
|
||||||
:b (.get x 1)
|
(.get x 1)
|
||||||
:c (.get x 2)
|
(.get x 2)
|
||||||
:d (.get x 3)
|
(.get x 3)
|
||||||
:e (.get x 4)
|
(.get x 4)
|
||||||
:f (.get x 5)})))}))
|
(.get x 5))))}))
|
||||||
|
|
||||||
(t/add-handlers!
|
(t/add-handlers!
|
||||||
{:id "matrix"
|
{:id "matrix"
|
||||||
:class Matrix
|
:class Matrix
|
||||||
:wfn #(into {} %)
|
:wfn #(into {} %)
|
||||||
:rfn (fn [m]
|
:rfn (fn [m]
|
||||||
(map->Matrix {:a (get m :a)
|
(pos->Matrix (get m :a)
|
||||||
:b (get m :b)
|
(get m :b)
|
||||||
:c (get m :c)
|
(get m :c)
|
||||||
:d (get m :d)
|
(get m :d)
|
||||||
:e (get m :e)
|
(get m :e)
|
||||||
:f (get m :f)}))})
|
(get m :f)))})
|
||||||
|
|
Loading…
Reference in a new issue