File tree 3 files changed +11
-11
lines changed
3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 45
45
(defn search-tag
46
46
" Get the current tag value from the page."
47
47
[]
48
- (.value (dom/get-element :twitter-search-tag )))
48
+ (.- value (dom/get-element :twitter-search-tag )))
49
49
50
50
(defn retrieve
51
51
" Send request to twitter."
205
205
(let [q (apply str (interpose " OR " (map #(str " from:" %)
206
206
(take max-missing-query missing))))]
207
207
(set-tweet-status :okay " Fetching mentioned tweets" )
208
- (retrieve (.strobj {" q" q " rpp" results-per-page})
208
+ (retrieve (.- strobj {" q" q " rpp" results-per-page})
209
209
#(add-missing-callback missing %)
210
210
error-callback)))
211
211
214
214
[]
215
215
(when-let [tag (:search-tag @state)]
216
216
(set-tweet-status :okay " Fetching tweets" )
217
- (retrieve (.strobj {" q" tag " rpp" results-per-page})
217
+ (retrieve (.- strobj {" q" tag " rpp" results-per-page})
218
218
new-tweets-callback
219
219
error-callback)))
220
220
Original file line number Diff line number Diff line change 52
52
[tag & args]
53
53
(let [[tag attrs children] (normalize-args tag args)
54
54
parent (dom/createDom (name tag)
55
- (.strobj (reduce (fn [m [k v]]
55
+ (.- strobj (reduce (fn [m [k v]]
56
56
(assoc m k v))
57
57
{}
58
58
(map #(vector (name %1 ) %2 )
Original file line number Diff line number Diff line change 77
77
78
78
; Draw mention edges
79
79
(doseq [[username {ux1 :x , uy1 :y }] locs
80
- :let [x1 (unit-to-pixel ux1 (.width canvas-size))
81
- y1 (unit-to-pixel uy1 (.height canvas-size))]
80
+ :let [x1 (unit-to-pixel ux1 (.- width canvas-size))
81
+ y1 (unit-to-pixel uy1 (.- height canvas-size))]
82
82
[mention-name mention-count] (:mentions (get mentions username))]
83
83
(when-let [{ux2 :x , uy2 :y } (get locs mention-name)]
84
- (let [x2 (unit-to-pixel ux2 (.width canvas-size))
85
- y2 (unit-to-pixel uy2 (.height canvas-size))]
84
+ (let [x2 (unit-to-pixel ux2 (.- width canvas-size))
85
+ y2 (unit-to-pixel uy2 (.- height canvas-size))]
86
86
(.drawPath g
87
87
(-> (. g (createPath )) (.moveTo x1 y1) (.lineTo x2 y2))
88
88
edge-stroke nil ))))
89
89
90
90
; Draw avatar nodes
91
91
(doseq [[username {:keys [x y] :as foo}] locs]
92
92
; (log (pr-str foo))
93
- (let [px (- (unit-to-pixel x (.width canvas-size)) (/ avatar-size 2 ))
94
- py (- (unit-to-pixel y (.height canvas-size)) (/ avatar-size 2 ))
93
+ (let [px (- (unit-to-pixel x (.- width canvas-size)) (/ avatar-size 2 ))
94
+ py (- (unit-to-pixel y (.- height canvas-size)) (/ avatar-size 2 ))
95
95
user (get mentions username)
96
96
image-url (get user :image-url default-avatar )
97
97
img (.drawImage g px py avatar-size avatar-size image-url)]
104
104
" No locations to graph"
105
105
text)]
106
106
(when text
107
- (.drawTextOnLine g text 5 20 (.width canvas-size) 20
107
+ (.drawTextOnLine g text 5 20 (.- width canvas-size) 20
108
108
" left" font nil fill)))))
109
109
110
110
(def graph-data (atom nil ))
You can’t perform that action at this time.
0 commit comments