Skip to content

Commit cc967d5

Browse files
committed
Use same thickness for all graph edge lines. clojure#48
1 parent 4f547cf commit cc967d5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

samples/twitterbuzz/src/twitterbuzz/showgraph.cljs

+2-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
; Drawing configuration
1414
(def avatar-size 32) ; used for both x and y dimensions of avatars
15-
(def edge-widths [0 1 2 3 4]) ; More mentions == thicker edges
1615
(def anneal-skipping 10)
1716
(def cooling 1000)
1817
; fail whale
@@ -25,10 +24,7 @@
2524
; BAD HACK: don't change globals like this -- find a better way:
2625
;(set! anim/TIMEOUT 500)
2726

28-
(def edge-strokes
29-
(vec (map #(graphics/Stroke. % "#009") edge-widths)))
30-
31-
(def max-stroke (peek edge-strokes))
27+
(def edge-stroke (graphics/Stroke. 1 "#009"))
3228

3329
(def g
3430
(doto (graphics/createGraphics "100%" "100%")
@@ -57,7 +53,7 @@
5753
y2 (unit-to-pixel uy2 (.height canvas-size))]
5854
(.drawPath g
5955
(-> (. g (createPath)) (.moveTo x1 y1) (.lineTo x2 y2))
60-
(get edge-strokes mention-count max-stroke) nil))))
56+
edge-stroke nil))))
6157

6258
; Draw avatar nodes
6359
(doseq [[username {:keys [x y] :as foo}] locs]

0 commit comments

Comments
 (0)