0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 00:58:26 -05:00

Remove unused code from data/shapes.

This commit is contained in:
Andrey Antukh 2016-12-25 21:28:45 +01:00
parent 2412713f70
commit cf55aeda63
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -126,22 +126,12 @@
;; --- Apply Temporal Displacement
(defn rotate
[{:keys [x1 y1 x2 y2 rotation] :as shape}]
(let [x-center (+ x1 (/ (- x2 x1) 2))
y-center (+ y1 (/ (- y2 y1) 2))]
(-> (gmt/matrix)
#_(gmt/translate x-center y-center)
(gmt/rotate 15)
#_(gmt/translate (- x-center) (- y-center)))))
(deftype ApplyTemporalDisplacement [id delta]
udp/IPageUpdate
ptk/UpdateEvent
(update [_ state]
(let [shape (get-in state [:shapes id])
displ (:tmp-displacement shape (gpt/point 0 0))
;; delta (gpt/transform delta (rotate shape))
delta (gpt/add displ delta)]
(assoc-in state [:shapes id :tmp-displacement] delta))))