mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Fix deref impl on matrix.
This commit is contained in:
parent
5d5b84a0a1
commit
5df6e6397d
1 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
(ns uxbox.util.geom.matrix
|
||||
(:require [uxbox.util.math :as mth]
|
||||
(:require [cuerdas.core :as str]
|
||||
[uxbox.util.math :as mth]
|
||||
[uxbox.util.geom.point :as gpt]))
|
||||
|
||||
(defrecord Matrix [a b c d tx ty])
|
||||
|
@ -11,7 +12,12 @@
|
|||
(extend-type Matrix
|
||||
cljs.core/IDeref
|
||||
(-deref [v]
|
||||
(mapv #(get v %) [:a :b :c :d :tx :ty])))
|
||||
(mapv #(get v %) [:a :c :b :d :tx :ty]))
|
||||
|
||||
Object
|
||||
(toString [v]
|
||||
(->> (str/join "," @v)
|
||||
(str/format "matrix(%s)"))))
|
||||
|
||||
(extend-protocol ICoerce
|
||||
nil
|
||||
|
|
Loading…
Add table
Reference in a new issue