mirror of
https://github.com/penpot/penpot.git
synced 2025-05-18 17:16:17 +02:00
Remove unused code from data/shapes.
This commit is contained in:
parent
2412713f70
commit
cf55aeda63
1 changed files with 0 additions and 10 deletions
|
@ -126,22 +126,12 @@
|
||||||
|
|
||||||
;; --- Apply Temporal Displacement
|
;; --- 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]
|
(deftype ApplyTemporalDisplacement [id delta]
|
||||||
udp/IPageUpdate
|
udp/IPageUpdate
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(let [shape (get-in state [:shapes id])
|
(let [shape (get-in state [:shapes id])
|
||||||
displ (:tmp-displacement shape (gpt/point 0 0))
|
displ (:tmp-displacement shape (gpt/point 0 0))
|
||||||
;; delta (gpt/transform delta (rotate shape))
|
|
||||||
delta (gpt/add displ delta)]
|
delta (gpt/add displ delta)]
|
||||||
(assoc-in state [:shapes id :tmp-displacement] delta))))
|
(assoc-in state [:shapes id :tmp-displacement] delta))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue