mirror of
https://github.com/penpot/penpot.git
synced 2026-04-30 13:49:06 +00:00
Add missing arity for transform method.
This commit is contained in:
parent
1abc0e4239
commit
f406ec2621
@ -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))))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user