src/widgets/Segments.js
branchnew-model
changeset 928 5aadbc9f27cd
parent 926 e47ed8eb75cd
child 930 165f236e42f2
--- a/src/widgets/Segments.js	Thu Jul 12 15:30:34 2012 +0200
+++ b/src/widgets/Segments.js	Fri Jul 20 17:15:53 2012 +0200
@@ -41,7 +41,7 @@
                 _center = _left + _width / 2,
                 _fulltext = _annotation.title + ( _annotation.description ? ( '<br/>' + _annotation.description ) : '' );
             return {
-                text : _fulltext.replace(/(^.{120,140})[\s].+$/m,'$1&hellip;'),
+                text : _fulltext.replace(/(\n|\r|\r\n)/mg,' ').replace(/(^.{120,140})[\s].+$/m,'$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 ),