mirror of
https://github.com/penpot/penpot.git
synced 2026-09-09 13:39:02 +00:00
🔥 Remove unused fn content->points
Replaced by get-points
This commit is contained in:
parent
60f754f172
commit
ba9fc37226
@ -137,22 +137,6 @@
|
|||||||
(let [phv (gpt/to-vec point handler)]
|
(let [phv (gpt/to-vec point handler)]
|
||||||
(gpt/add point (gpt/negate phv))))
|
(gpt/add point (gpt/negate phv))))
|
||||||
|
|
||||||
;; FIXME: revisit, this function is executed many times per render on
|
|
||||||
;; path editor it is easy to be implemented in function of PathData
|
|
||||||
;; type in a more efficient way
|
|
||||||
|
|
||||||
(defn content->points
|
|
||||||
"Returns the points in the given content"
|
|
||||||
[content]
|
|
||||||
(letfn [(segment->point [seg]
|
|
||||||
(let [params (get seg :params)
|
|
||||||
x (get params :x)
|
|
||||||
y (get params :y)]
|
|
||||||
(when (d/num? x y)
|
|
||||||
(gpt/point x y))))]
|
|
||||||
(some->> (seq content)
|
|
||||||
(into [] (keep segment->point)))))
|
|
||||||
|
|
||||||
(defn get-points
|
(defn get-points
|
||||||
"Returns points for the given segment, faster version of
|
"Returns points for the given segment, faster version of
|
||||||
the `content->points`."
|
the `content->points`."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user