mirror of
https://github.com/penpot/penpot.git
synced 2026-09-18 09:56:15 +00:00
Add align to text and circle resize.
This commit is contained in:
parent
f054233a9e
commit
a63c9f7d33
@ -141,12 +141,15 @@
|
|||||||
;; --- Vertex Access
|
;; --- Vertex Access
|
||||||
|
|
||||||
(declare get-rect-vertext-point)
|
(declare get-rect-vertext-point)
|
||||||
|
(declare get-circle-vertext-point)
|
||||||
|
|
||||||
(defn get-vertex-point
|
(defn get-vertex-point
|
||||||
[shape id]
|
[shape id]
|
||||||
(case (:type shape)
|
(case (:type shape)
|
||||||
:icon (get-rect-vertext-point shape id)
|
: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
|
(defn- get-rect-vertext-point
|
||||||
[{:keys [x1 y1 x2 y2]} id]
|
[{:keys [x1 y1 x2 y2]} id]
|
||||||
@ -156,6 +159,10 @@
|
|||||||
3 (gpt/point x1 y2)
|
3 (gpt/point x1 y2)
|
||||||
4 (gpt/point x2 y2)))
|
4 (gpt/point x2 y2)))
|
||||||
|
|
||||||
|
(defn- get-circle-vertext-point
|
||||||
|
[{:keys [rx ry]} id]
|
||||||
|
(gpt/point rx ry))
|
||||||
|
|
||||||
;; --- Vertex Movement (Relative)
|
;; --- Vertex Movement (Relative)
|
||||||
|
|
||||||
(declare move-rect-vertex)
|
(declare move-rect-vertex)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user