Skip to content

Commit

Permalink
Merge pull request #5740 from avalonmediasystem/timeline_section
Browse files Browse the repository at this point in the history
Set timespan off full item duration for top level sections
  • Loading branch information
masaball authored Apr 5, 2024
2 parents 45088cb + dbbeb99 commit 5f87075
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/assets/javascripts/ramp_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,15 @@ function getTimelineScopes() {
let parent = currentStructureItem.closest('ul').closest('li');
while (parent.length > 0) {
let next = parent.closest('ul').closest('li');
let begin = 0;
let end = '';
let tracks = parent.find('li a');
trackCount = tracks.length;
let begin = parseFloat(tracks[0].hash.split('#t=').reverse()[0].split(',')[0]) || 0;
let end = parseFloat(tracks[trackCount - 1].hash.split('#t=').reverse()[0].split(',')[1]) || '';
// Only assign begin/end when structure item is a subsection, not a top level section
if (next.length > 0) {
begin = parseFloat(tracks[0].hash.split('#t=').reverse()[0].split(',')[0]) || 0;
end = parseFloat(tracks[trackCount - 1].hash.split('#t=').reverse()[0].split(',')[1]) || '';
}
streamId = tracks[0].pathname.split('/').reverse()[0];
let label = parent[0].dataset.label;
scopes.push({
Expand Down

0 comments on commit 5f87075

Please sign in to comment.