shoeset

Check-in [fd8c0d0bb2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Check for infinity when all tags are the same in a set
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fd8c0d0bb243896d31b840e825989e1c739804e9c5ccf3c6fc7646a6400434f8
User & Date: i5ivem@gmail.com 2010-03-26 13:57:39
Context
2010-03-29
12:36
Adding "loading" animation for app and set list * An attempt to reduce the 'hang' of startup when the app is actually performing flickr login and getting the set list * Quite sure this could be done more nicely check-in: bb7231a2cb user: i5ivem@gmail.com tags: trunk
2010-03-26
13:57
Check for infinity when all tags are the same in a set check-in: fd8c0d0bb2 user: i5ivem@gmail.com tags: trunk
2010-03-16
15:27
Converted to textile format, added content check-in: ac56e030d1 user: i5ivem@gmail.com tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to cloud.rb.

33
34
35
36
37
38
39


40
41
42
43
44
45
46
    18.0 / (max - min)
  end
  

  def build
    cloud = String.new
    ratio = font_ratio(@wordcount)


	color = ["steelblue", "deeppink"]
    @wordcount.each_key do |word|
      font_size = (10 + (@wordcount[word] * ratio)).round #must round for shoes since pixels
	  cloud << %Q{para "#{word}", :size => #{font_size}, :stroke => #{color[0]}; }
	  color.reverse! #alternate between colours
    end
    cloud







>
>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
    18.0 / (max - min)
  end
  

  def build
    cloud = String.new
    ratio = font_ratio(@wordcount)
	ratio = 1 if ratio.infinite?
	debug(ratio) #Need to fix for infinity
	color = ["steelblue", "deeppink"]
    @wordcount.each_key do |word|
      font_size = (10 + (@wordcount[word] * ratio)).round #must round for shoes since pixels
	  cloud << %Q{para "#{word}", :size => #{font_size}, :stroke => #{color[0]}; }
	  color.reverse! #alternate between colours
    end
    cloud