Skip to content

Commit c3ceea2

Browse files
committed
ns fixes
1 parent 89c8fe8 commit c3ceea2

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

.clj-kondo/config.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
:clojure-lsp/unused-public-var {:exclude-regex #{"pages.*"}}
2525
:consistent-alias {:level :warning
2626
:aliases {clojure.core.matrix matrix
27-
clojure.core.matrix.stats mat.stats
27+
clojure.core.matrix.stats matrix.stats
2828
clojure.set set
2929
clojure.string string
3030
malli.core m

src/renderer/element/impl/custom/brush.cljs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
(:require
44
["perfect-freehand" :refer [getStroke]]
55
[clojure.core.matrix :as matrix]
6-
[clojure.core.matrix.stats :as mat.stats]
6+
[clojure.core.matrix.stats :as matrix.stats]
77
[clojure.string :as string]
8-
[renderer.attribute.hierarchy :as attr.hierarchy]
9-
[renderer.attribute.impl.range :as attr.range]
8+
[renderer.attribute.hierarchy :as attribute.hierarchy]
9+
[renderer.attribute.impl.range :as attribute.impl.range]
1010
[renderer.attribute.views :as attribute.views]
1111
[renderer.element.hierarchy :as element.hierarchy]
1212
[renderer.event.impl.pointer :as event.impl.pointer]
@@ -35,39 +35,39 @@
3535
(defonce option-keys
3636
[:size :thinning :smoothing :streamline])
3737

38-
(derive :thinning ::attr.range/range)
39-
(derive :smoothing ::attr.range/range)
40-
(derive :streamline ::attr.range/range)
38+
(derive :thinning ::attribute.impl.range/range)
39+
(derive :smoothing :attribute.impl.range/range)
40+
(derive :streamline ::attribute.impl.range/range)
4141

42-
(defmethod attr.hierarchy/form-element [:brush :size]
42+
(defmethod attribute.hierarchy/form-element [:brush :size]
4343
[_ k v attrs]
4444
[attribute.views/range-input k v (merge attrs {:min 1
4545
:max 100
4646
:step 1})])
4747

48-
(defmethod attr.hierarchy/form-element [:brush :points]
48+
(defmethod attribute.hierarchy/form-element [:brush :points]
4949
[_ _k v]
5050
[:input.form-element {:value v
5151
:disabled true
5252
:placeholder (when-not v "multiple")}])
5353

54-
(defmethod attr.hierarchy/description [:brush ::points]
54+
(defmethod attribute.hierarchy/description [:brush ::points]
5555
[]
5656
"Input points recorded from a user's mouse movement.")
5757

58-
(defmethod attr.hierarchy/description [:brush :size]
58+
(defmethod attribute.hierarchy/description [:brush :size]
5959
[]
6060
"The base size (diameter) of the stroke.")
6161

62-
(defmethod attr.hierarchy/description [:brush :thinning]
62+
(defmethod attribute.hierarchy/description [:brush :thinning]
6363
[]
6464
"The effect of pressure on the stroke's size.")
6565

66-
(defmethod attr.hierarchy/description [:brush :smoothing]
66+
(defmethod attribute.hierarchy/description [:brush :smoothing]
6767
[]
6868
"How much to soften the stroke's edges.")
6969

70-
(defmethod attr.hierarchy/description [:brush :streamline]
70+
(defmethod attribute.hierarchy/description [:brush :streamline]
7171
[]
7272
"How much to streamline the stroke.")
7373

@@ -84,18 +84,18 @@
8484
d (str
8585
"M" (.toFixed (first a) 2) "," (.toFixed (second a) 2)
8686
" Q" (.toFixed (first b) 2) "," (.toFixed (second b) 2)
87-
" " (.toFixed (mat.stats/mean [(first b) (first c)]) 2) ","
88-
(.toFixed (mat.stats/mean [(second b) (second c)]) 2) " T")]
87+
" " (.toFixed (matrix.stats/mean [(first b) (first c)]) 2) ","
88+
(.toFixed (matrix.stats/mean [(second b) (second c)]) 2) " T")]
8989
(reduce-kv
9090
(fn [result index]
9191
(if (or (= len (inc index)) (< index 2))
9292
result
9393
(let [a (nth points index)
9494
b (nth points (inc index))]
9595
(str result
96-
(.toFixed (mat.stats/mean [(first a) (first b)]) 2)
96+
(.toFixed (matrix.stats/mean [(first a) (first b)]) 2)
9797
","
98-
(.toFixed (mat.stats/mean [(second a) (second b)]) 2)
98+
(.toFixed (matrix.stats/mean [(second a) (second b)]) 2)
9999
" ")))) d points)))))
100100

101101
(def partition-to-px

0 commit comments

Comments
 (0)