From f406ec2621ed6f102201ccb657365f2894c9d455 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 5 Feb 2016 18:26:24 +0200 Subject: [PATCH] Add missing arity for transform method. --- src/uxbox/util/geom/matrix.cljs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/uxbox/util/geom/matrix.cljs b/src/uxbox/util/geom/matrix.cljs index 22b1344218..dfb064df4f 100644 --- a/src/uxbox/util/geom/matrix.cljs +++ b/src/uxbox/util/geom/matrix.cljs @@ -78,7 +78,10 @@ (defn translate "Apply translate transformation to the matrix." - [m pt] - (assoc m - :tx (+ (:tx m) (* (:x pt) (:a m)) (* (:y pt) (:b m))) - :ty (+ (:ty m) (* (:x pt) (:c m)) (* (:y pt) (:d m))))) + ([m pt] + (let [pt (gpt/-point pt)] + (assoc m + :tx (+ (:tx m) (* (:x pt) (:a m)) (* (:y pt) (:b m))) + :ty (+ (:ty m) (* (:x pt) (:c m)) (* (:y pt) (:d m)))))) + ([m x y] + (translate m (gpt/point x y))))