src/js/widgets/arrowWidget.js
branchpopcorn-port
changeset 820 7968346b9689
parent 803 4955d857e304
child 842 4ae2247a59f4
equal deleted inserted replaced
819:9b8e68803f6f 820:7968346b9689
    41   /* move the arrow only if the current annotation changes */
    41   /* move the arrow only if the current annotation changes */
    42   if (currentAnnotation != this._oldAnnotation) {
    42   if (currentAnnotation != this._oldAnnotation) {
    43     var begin = (+ currentAnnotation.begin) / 1000;
    43     var begin = (+ currentAnnotation.begin) / 1000;
    44     var end = (+ currentAnnotation.end) / 1000;
    44     var end = (+ currentAnnotation.end) / 1000;
    45 
    45 
    46     var duration = +this._serializer.currentMedia().meta["dc:duration"] / 1000;
    46     var duration = this._serializer.getDuration() / 1000;
    47     var middle_time = (begin + end) / 2;
    47     var middle_time = (begin + end) / 2;
    48     var percents = middle_time / duration;
    48     var percents = middle_time / duration;
    49 
    49 
    50     // we need to apply a fix because the arrow has a certain length
    50     // we need to apply a fix because the arrow has a certain length
    51     // it's half the length of the arrow (27 / 2). We need to convert
    51     // it's half the length of the arrow (27 / 2). We need to convert