From 5df6e6397ddf045c6a3317b494ac85020b4d0674 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 6 Feb 2016 17:37:26 +0200 Subject: [PATCH] Fix deref impl on matrix. --- src/uxbox/util/geom/matrix.cljs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/uxbox/util/geom/matrix.cljs b/src/uxbox/util/geom/matrix.cljs index dfb064df4f..e987936f75 100644 --- a/src/uxbox/util/geom/matrix.cljs +++ b/src/uxbox/util/geom/matrix.cljs @@ -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