--- a/web/res/metadataplayer/Tagcloud.js Mon May 21 18:53:02 2012 +0200
+++ b/web/res/metadataplayer/Tagcloud.js Tue May 22 16:47:35 2012 +0200
@@ -7,7 +7,7 @@
IriSP.Widgets.Tagcloud.prototype.template =
'<div class="Ldt-Tagcloud-Container"><ul class="Ldt-Tagcloud-List">'
- + '{{#words}}<li class="Ldt-Tagcloud-item" content="{{word}}" style="font-size: {{size}}px">{{word}}</li>{{/words}}'
+ + '{{#words}}<li class="Ldt-Tagcloud-item Ldt-TraceMe" trace-info="tag:{{word}}" content="{{word}}" style="font-size: {{size}}px">{{word}}</li>{{/words}}'
+ '</ul></div>';
IriSP.Widgets.Tagcloud.prototype.defaults = {
@@ -66,6 +66,9 @@
})
.first(this.tag_count)
.value();
+ if (!_words.length) {
+ return;
+ }
var _max = _words[0].count,
_min = Math.min(_words[_words.length - 1].count, _max - 1),
_scale = (this.max_font_size - this.min_font_size) / Math.sqrt(_max - _min);