diff -r de1e7cf6bfc4 -r 7253d4d06f0d src/widgets/MultiSegments.js --- a/src/widgets/MultiSegments.js Fri Oct 25 01:32:13 2013 +0200 +++ b/src/widgets/MultiSegments.js Thu Jan 02 16:54:22 2014 +0100 @@ -6,7 +6,7 @@ IriSP.Widgets.MultiSegments.prototype.defaults = { annotation_show_arrow: true, - annotation_start_minimized: true, + annotation_start_minimized: false, annotation_show_annotation_type: true, show_all: false }; @@ -96,10 +96,26 @@ lines.push(line); } }); - var _annotationWidgets = _this.$.find(".Ldt-MultiSegments-Annotation"); + + // open line on segment click + $j(document).on("click",".Ldt-Segments-Segment",function(e){ + if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) { + currentLine = undefined; + } + IriSP._(lines).each(function(line) { + if($j(e.target).parent().parent()[0]==line.segmentWidget[0]){ + currentLine = line; + line.show(); + } else { + line.hide(); + } + }); + }); + + //var _annotationWidgets = _this.$.find(".Ldt-MultiSegments-Annotation"); function checkVisibilities(_time) { - if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) { + /*if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) { currentLine = undefined; } IriSP._(lines).each(function(line) { @@ -115,8 +131,6 @@ } else { line.hide(); } - }); + });*/ } - - this.onMediaEvent("timeupdate", checkVisibilities); }; \ No newline at end of file