File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 18
18
[renderer.utils.hiccup :refer [Hiccup]]
19
19
[renderer.utils.math :as math :refer [Vec2]]))
20
20
21
- (m/=> point-of-interest [:-> Vec2 Hiccup any?])
22
- (defn point-of-interest
23
- " Simple dot used for debugging purposes."
21
+ (m/=> dot [:-> Vec2 Hiccup any?])
22
+ (defn dot
24
23
[[x y] & children]
25
24
(let [zoom @(rf/subscribe [::document.s/zoom ])]
26
25
(into [:circle {:cx x
144
143
(let [zoom @(rf/subscribe [::document.s/zoom ])
145
144
[x1 y1 _x2 _y2] bounds
146
145
[width height] (bounds/->dimensions bounds)
147
- stroke-width (/ 2 zoom)
146
+ stroke-width (/ 1 zoom)
148
147
stroke-dasharray (/ theme.db/dash-size zoom)
149
148
attrs {:x x1
150
149
:y y1
184
183
(when-let [pos (element.hierarchy/centroid el)]
185
184
(let [offset (element/offset el)
186
185
pos (mat/add offset pos)]
187
- [point-of-interest pos
186
+ [dot pos
188
187
[:title " Centroid" ]])))
You can’t perform that action at this time.
0 commit comments