0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 17:00:36 -05:00

Add align to text and circle resize.

This commit is contained in:
Andrey Antukh 2016-04-22 20:05:37 +03:00
parent f054233a9e
commit a63c9f7d33
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -141,12 +141,15 @@
;; --- Vertex Access
(declare get-rect-vertext-point)
(declare get-circle-vertext-point)
(defn get-vertex-point
[shape id]
(case (:type shape)
:icon (get-rect-vertext-point shape id)
:rect (get-rect-vertext-point shape id)))
:rect (get-rect-vertext-point shape id)
:circle (get-circle-vertext-point shape id)
:text (get-rect-vertext-point shape id)))
(defn- get-rect-vertext-point
[{:keys [x1 y1 x2 y2]} id]
@ -156,6 +159,10 @@
3 (gpt/point x1 y2)
4 (gpt/point x2 y2)))
(defn- get-circle-vertext-point
[{:keys [rx ry]} id]
(gpt/point rx ry))
;; --- Vertex Movement (Relative)
(declare move-rect-vertex)