mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 00:06:11 +02:00
Add update-path-point function to geom ns.
This commit is contained in:
parent
63f6de930d
commit
a4f29d25e1
1 changed files with 10 additions and 0 deletions
|
@ -245,6 +245,16 @@
|
||||||
:bottom (assoc shape :ry (max 0 (+ (:ry shape) dy)))
|
:bottom (assoc shape :ry (max 0 (+ (:ry shape) dy)))
|
||||||
:left (assoc shape :rx (max 0 (+ (:rx shape) dx))))))
|
: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)
|
;; --- Resize (Absolute)
|
||||||
|
|
||||||
(declare resize-rect)
|
(declare resize-rect)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue