equal
deleted
inserted
replaced
34 _(_annotations).each(function(_a, i) { |
34 _(_annotations).each(function(_a, i) { |
35 var pos = k * (_a.begin + _a.end) / 2, |
35 var pos = k * (_a.begin + _a.end) / 2, |
36 corrpos = Math.max(106, Math.min(516, pos)), |
36 corrpos = Math.max(106, Math.min(516, pos)), |
37 line = IriSP._(lines).find(function(line) { |
37 line = IriSP._(lines).find(function(line) { |
38 return !IriSP._(line.annotations).find(function(ann) { |
38 return !IriSP._(line.annotations).find(function(ann) { |
39 return ann.begin < _a.end && ann.end > _a.begin |
39 return ann.begin < _a.end && ann.end > _a.begin; |
40 }); |
40 }); |
41 }); |
41 }); |
42 if (!line) { |
42 if (!line) { |
43 line = { index: lines.length, annotations: []}; |
43 line = { index: lines.length, annotations: []}; |
44 lines.push(line); |
44 lines.push(line); |
51 width : k * _a.getDuration(), |
51 width : k * _a.getDuration(), |
52 height: 8, |
52 height: 8, |
53 top: 8 * line.index, |
53 top: 8 * line.index, |
54 pointerpos : (pos - corrpos), |
54 pointerpos : (pos - corrpos), |
55 color: IriSP.vizcolors[i % IriSP.vizcolors.length] |
55 color: IriSP.vizcolors[i % IriSP.vizcolors.length] |
56 } |
56 }; |
57 html += segmenttemplate(vizdata); |
57 html += segmenttemplate(vizdata); |
58 }); |
58 }); |
59 return segmentlisttemplate({ |
59 return segmentlisttemplate({ |
60 height: 8 * lines.length, |
60 height: 8 * lines.length, |
61 segments: html |
61 segments: html |
150 var pid = $(this).attr("data-mashup-id"); |
150 var pid = $(this).attr("data-mashup-id"); |
151 $(".media-segment[data-mashup-id='" + pid + "']").addClass("active"); |
151 $(".media-segment[data-mashup-id='" + pid + "']").addClass("active"); |
152 }).on("mouseout", ".item-video", function() { |
152 }).on("mouseout", ".item-video", function() { |
153 $(".media-segment").removeClass("active"); |
153 $(".media-segment").removeClass("active"); |
154 }); |
154 }); |
155 } |
155 }; |
156 |
156 |
157 /* END mediaplayer.js */ |
157 /* END mediaplayer.js */ |
158 |
158 |