Skip to content

Commit 60b59c7

Browse files
committed
Cosmetic.
1 parent dae1fb5 commit 60b59c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

chapter_18/11_yahoo_search_visualization.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def setup
1111
size 500, 300
1212
text_font create_font("Georgia", 20, true)
1313
smooth
14-
14+
1515
# Search for all names
1616
# The search() function is called for each name in the array.
1717
@yahoo = []
@@ -21,7 +21,7 @@ def setup
2121
@yahoo << YahooSearch.new(self, "YOUR API KEY HERE")
2222
@yahoo.last.search(name)
2323
end
24-
24+
2525
@bubbles = { }
2626
@search_count = 0
2727
end
@@ -45,15 +45,15 @@ def search_event(yahoo)
4545
# getTotalResultsAvailable() returns the total number of web pages that Yahoo found containing the search phrase.
4646
# These numbers can be quite large so they are scaled down before being used as an ellipse size.
4747
total = yahoo.get_total_results_available
48-
48+
4949
# Scale down the number so that it can be viewable
5050
r = sqrt(total) / 75.0
51-
51+
5252
# Make a new bubble object
5353
# The search data is used to make a Bubble object for the visualization.
5454
search = yahoo.get_search_string
5555
return if @bubbles.has_key? search
56-
56+
5757
b = Bubble.new(search, r, 50 + @search_count * 100, $app.height / 2)
5858
@bubbles[search] = b
5959
@search_count += 1
@@ -69,7 +69,7 @@ def initialize(search, r, x, y)
6969
@x = x
7070
@y = y
7171
end
72-
72+
7373
def display
7474
$app.stroke 0
7575
$app.fill 0, 50

0 commit comments

Comments
 (0)