From a63c9f7d333bfe3b84087f8248373caf9cac6f76 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 22 Apr 2016 20:05:37 +0300 Subject: [PATCH] Add align to text and circle resize. --- src/uxbox/util/geom.cljs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/uxbox/util/geom.cljs b/src/uxbox/util/geom.cljs index 0f30c33287..e30ed33e04 100644 --- a/src/uxbox/util/geom.cljs +++ b/src/uxbox/util/geom.cljs @@ -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)