From 2f68310a7cee6c2d43121a3ac34c03f5688dbf99 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 26 Aug 2024 15:41:01 +0200 Subject: [PATCH] :paperclip: Add some fixmes for future path changes --- common/src/app/common/geom/shapes/path.cljc | 2 ++ frontend/src/app/util/path/tools.cljs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/common/src/app/common/geom/shapes/path.cljc b/common/src/app/common/geom/shapes/path.cljc index 9295c421d9..aaaf9dc3e8 100644 --- a/common/src/app/common/geom/shapes/path.cljc +++ b/common/src/app/common/geom/shapes/path.cljc @@ -893,6 +893,7 @@ (reduce +) (not= 0)))) +;; FIXME: this should be on upc/ namespace (defn split-line-to "Given a point and a line-to command will create a two new line-to commands that will split the original line into two given a value between 0-1" @@ -901,6 +902,7 @@ sp (gpt/lerp from-p to-p t-val)] [(upc/make-line-to sp) cmd])) +;; FIXME: this should be on upc/ namespace (defn split-curve-to "Given the point and a curve-to command will split the curve into two new curve-to commands given a value between 0-1" diff --git a/frontend/src/app/util/path/tools.cljs b/frontend/src/app/util/path/tools.cljs index 516ef047df..e054820aa9 100644 --- a/frontend/src/app/util/path/tools.cljs +++ b/frontend/src/app/util/path/tools.cljs @@ -12,6 +12,8 @@ [app.common.svg.path.command :as upc] [clojure.set :as set])) +;; FIXME: move to common, there are nothing tied to frontend + (defn remove-line-curves "Remove all curves that have both handlers in the same position that the beginning and end points. This makes them really line-to commands"