Bugfix on Polemic Widget V01.74
authorRaphael Velt <raph.velt@gmail.com>
Fri, 04 May 2012 09:40:32 +0200
changeset 600 936c3e17d9ca
parent 599 42bce53bd476
child 601 68fea6b83600
Bugfix on Polemic Widget
web/res/metadataplayer/Polemic.js
--- a/web/res/metadataplayer/Polemic.js	Thu May 03 18:20:31 2012 +0200
+++ b/web/res/metadataplayer/Polemic.js	Fri May 04 09:40:32 2012 +0200
@@ -224,7 +224,7 @@
             _html = '',
             _scale = this.max_elements * this.element_height / _max;
             
-        function displayElement(_x, _y, _h, _color, _nums, _begin, _end) {
+        function displayStackElement(_x, _y, _h, _color, _nums, _begin, _end) {
             _html += Mustache.to_html(
                 '<div class="Ldt-Polemic-TweetDiv" pos-x="{{posx}}" pos-y="{{top}}" annotation-counts="{{nums}}" begin-time="{{begin}}" end-time="{{end}}"'
                 + ' style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',
@@ -249,14 +249,14 @@
             if (_slice.annotations.length) {
                 var _h = Math.ceil(_scale * _slice.annotations.length);
                 _y -= _h;
-                displayElement(_x, _y, _h, _this.defaultcolor, _nums, _slice.begin, _slice.end);
+                displayStackElement(_x, _y, _h, _this.defaultcolor, _nums, _slice.begin, _slice.end);
             }
             IriSP._(_slice.polemicStacks).forEach(function(_annotations, _j) {
                 if (_annotations.length) {
                     var _color = _this.polemics[_j].color,
                         _h = Math.ceil(_scale * _annotations.length);
                     _y -= _h;
-                    displayElement(_x, _y, _h, _color, _nums, _slice.begin, _slice.end);
+                    displayStackElement(_x, _y, _h, _color, _nums, _slice.begin, _slice.end);
                 }
             });
             _x += _this.element_width;