src/js/widgets/arrowWidget.js
branchpopcorn-port
changeset 754 b119a956b647
parent 664 c548eb0be4ef
child 803 4955d857e304
equal deleted inserted replaced
753:72eecd7250e5 754:b119a956b647
    28   if (this._blockArrow)
    28   if (this._blockArrow)
    29     return;
    29     return;
    30   
    30   
    31   var currentTime = this._Popcorn.currentTime();
    31   var currentTime = this._Popcorn.currentTime();
    32   var currentAnnotation = this._serializer.currentChapitre(currentTime);
    32   var currentAnnotation = this._serializer.currentChapitre(currentTime);
    33   if (IriSP.null_or_undefined(currentAnnotation))
    33   if (IriSP.null_or_undefined(currentAnnotation)) {
    34     var currentAnnotation = this._serializer.currentAnnotation(currentTime)[0]; // FIXME : use the others ?
    34     var c_annots = this._serializer.currentAnnotation(currentTime)
    35 
    35     if (c_annots.length != 0)
       
    36       var currentAnnotation = c_annots[0]; // FIXME : use the others ?
       
    37     else
       
    38       return;
       
    39   }
       
    40   
    36   /* move the arrow only if the current annotation changes */
    41   /* move the arrow only if the current annotation changes */
    37   if (currentAnnotation != this._oldAnnotation) {
    42   if (currentAnnotation != this._oldAnnotation) {
    38     var begin = (+ currentAnnotation.begin) / 1000;
    43     var begin = (+ currentAnnotation.begin) / 1000;
    39     var end = (+ currentAnnotation.end) / 1000;
    44     var end = (+ currentAnnotation.end) / 1000;
    40 
    45