diff --git a/common/src/app/common/geom/matrix.cljc b/common/src/app/common/geom/matrix.cljc index 695925bf94..b03cba0d4e 100644 --- a/common/src/app/common/geom/matrix.cljc +++ b/common/src/app/common/geom/matrix.cljc @@ -14,7 +14,12 @@ ;; --- Matrix Impl -(defrecord Matrix [a b c d e f] +(defrecord Matrix [^double a + ^double b + ^double c + ^double d + ^double e + ^double f] Object (toString [_] (str "matrix(" a "," b "," c "," d "," e "," f ")"))) diff --git a/common/src/app/common/transit.cljc b/common/src/app/common/transit.cljc index e6d90e18d9..4333051ee7 100644 --- a/common/src/app/common/transit.cljc +++ b/common/src/app/common/transit.cljc @@ -72,7 +72,15 @@ (fn [v] (into {} v)))) (def matrix-read-handler - (t/read-handler gmt/map->Matrix)) + (t/read-handler (fn [data] + #?(:cljs (gmt/map->Matrix data) + :clj (let [{:keys [a b c d e f]} data] + (gmt/matrix (double a) + (double b) + (double c) + (double d) + (double e) + (double f))))))) ;; --- ORDERED SET