equal
deleted
inserted
replaced
43 width : wSegmentNew, |
43 width : wSegmentNew, |
44 left : lSegmentNew |
44 left : lSegmentNew |
45 }); |
45 }); |
46 |
46 |
47 row.find('.begin').text(chapterData.begin); |
47 row.find('.begin').text(chapterData.begin); |
|
48 console.log(chapterData.getDuration()) |
48 row.find('.duration').text(chapterData.getDuration()); |
49 row.find('.duration').text(chapterData.getDuration()); |
49 row.find('.end').text(chapterData.end); |
50 row.find('.end').text(chapterData.end); |
50 |
51 |
51 if(form){ |
52 if(form){ |
52 form.find('.begin').text(chapterData.begin); |
53 form.find('.begin').text(chapterData.begin); |
56 form.find('.end').attr('data-milliseconds',chapterData.end); |
57 form.find('.end').attr('data-milliseconds',chapterData.end); |
57 } |
58 } |
58 } |
59 } |
59 |
60 |
60 function updateChapterDuration(val, chapterBefore, chapterAfter){ |
61 function updateChapterDuration(val, chapterBefore, chapterAfter){ |
61 if (val<=chapterAfter.end && val>=chapterBefore.begin) { |
62 |
|
63 if (val<=chapterAfter.end && val>=chapterBefore.begin && chapterAfter.end-val>secMiniChapter*1000 && val-chapterBefore.begin>secMiniChapter*1000) { |
62 chapterAfter.setBegin(val); |
64 chapterAfter.setBegin(val); |
63 chapterBefore.setEnd(val); |
65 chapterBefore.setEnd(val); |
64 |
66 |
65 updateRenderChapter(chapterAfter); |
67 updateRenderChapter(chapterAfter); |
66 updateRenderChapter(chapterBefore); |
68 updateRenderChapter(chapterBefore); |
81 var indexChapter = _.indexOf(chapters, currentChapter); |
83 var indexChapter = _.indexOf(chapters, currentChapter); |
82 if(indexChapter == chapters.length-1 || chapters.length<=1) return; |
84 if(indexChapter == chapters.length-1 || chapters.length<=1) return; |
83 |
85 |
84 var chapterAfter = chapters[indexChapter+1], |
86 var chapterAfter = chapters[indexChapter+1], |
85 chapterBefore = currentChapter; |
87 chapterBefore = currentChapter; |
|
88 |
|
89 updateChapterDuration(val, chapterBefore, chapterAfter); |
|
90 |
86 |
91 |
87 updateChapterDuration(val, chapterBefore, chapterAfter); |
|
88 }); |
92 }); |
89 /* |
93 /* |
90 $(".tangle-start") |
94 $(".tangle-start") |
91 .mouseup(function(evt) { |
95 .mouseup(function(evt) { |
92 |
96 |