integration/js/tangle.js
changeset 74 22aca5b735a2
parent 63 55b26d1c32ef
child 101 e40637c085b0
equal deleted inserted replaced
71:79974d302930 74:22aca5b735a2
    32         });
    32         });
    33 
    33 
    34     function updateRenderChapter(chapterData){
    34     function updateRenderChapter(chapterData){
    35         var segment = $('.chapter-segments li#'+chapterData.id),
    35         var segment = $('.chapter-segments li#'+chapterData.id),
    36             wChapterSegmentWrap = $('.chapter-segments').width(),
    36             wChapterSegmentWrap = $('.chapter-segments').width(),
    37             wSegmentNew = Math.floor(chapterData.getDuration() * wChapterSegmentWrap / myMedia.duration),
    37             wSegmentNew = chapterData.getDuration() * wChapterSegmentWrap / myMedia.duration,
       
    38             lSegmentNew = chapterData.begin * wChapterSegmentWrap / myMedia.duration,
    38             row = $('#row-list-chapter-'+chapterData.id),
    39             row = $('#row-list-chapter-'+chapterData.id),
    39             form = ($('#form-chapter-edit-'+chapterData.id).length) ? $('#form-chapter-edit-'+chapterData.id) : false;
    40             form = ($('#form-chapter-edit-'+chapterData.id).length) ? $('#form-chapter-edit-'+chapterData.id) : false;
    40 
    41 
    41         segment.width(wSegmentNew);
    42         segment.css({
       
    43             width : wSegmentNew,
       
    44             left : lSegmentNew
       
    45         });
    42 
    46 
    43         row.find('.begin').text(chapterData.begin);
    47         row.find('.begin').text(chapterData.begin);
    44         row.find('.duration').text(chapterData.getDuration());
    48         row.find('.duration').text(chapterData.getDuration());
    45         row.find('.end').text(chapterData.end);
    49         row.find('.end').text(chapterData.end);
    46 
    50