web/res/metadataplayer/Segments.js
changeset 618 f65c1c3f77ea
parent 598 d366aa22bd79
child 623 5b7d7ab6baff
--- a/web/res/metadataplayer/Segments.js	Wed May 16 12:40:35 2012 +0200
+++ b/web/res/metadataplayer/Segments.js	Mon May 21 12:15:21 2012 +0200
@@ -42,9 +42,10 @@
         segments : _list.map(function(_annotation, _k) {
             var _left = _annotation.begin * _scale,
                 _width = ( _annotation.end - _annotation.begin ) * _scale,
-                _center = _left + _width / 2;
+                _center = _left + _width / 2,
+                _fulltext = _annotation.title + ( _annotation.description ? ( '<br/>' + _annotation.description ) : '' );
             return {
-                text : _annotation.title + ( _annotation.description ? '<br />' + _annotation.description.replace(/(^.{120,140})[\s].+$/,'$1&hellip;') : ''),
+                text : _fulltext.replace(/(^.{120,140})[\s].+$/,'$1&hellip;'),
                 color : ( typeof _annotation.color !== "undefined" && _annotation.color ? _annotation.color : _this.colors[_k % _this.colors.length] ),
                 beginseconds : _annotation.begin.getSeconds() ,
                 left : Math.floor( _left ),