src/widgets/Polemic.js
branchnew-model
changeset 883 d35ad8111c5e
parent 882 61c384dda19e
child 906 4b6e154ae8de
--- a/src/widgets/Polemic.js	Thu May 03 17:52:52 2012 +0200
+++ b/src/widgets/Polemic.js	Fri May 04 16:56:41 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;