From a4f29d25e154ee99a8c650e2c3e72b69f89144ea Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sun, 21 Aug 2016 23:30:01 +0300 Subject: [PATCH] Add update-path-point function to geom ns. --- src/uxbox/main/geom.cljs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/uxbox/main/geom.cljs b/src/uxbox/main/geom.cljs index 64bc4d7a4..9ae97525f 100644 --- a/src/uxbox/main/geom.cljs +++ b/src/uxbox/main/geom.cljs @@ -245,6 +245,16 @@ :bottom (assoc shape :ry (max 0 (+ (:ry shape) dy))) :left (assoc shape :rx (max 0 (+ (:rx shape) dx)))))) +;; --- Paths + +(defn update-path-point + "Update a concrete point in the path. + + The point should exists before, this function + does not adds it automatically." + [shape index point] + (assoc-in shape [:points index] point)) + ;; --- Resize (Absolute) (declare resize-rect)