src/js/widgets/annotationsListWidget.js
branchpopcorn-port
changeset 642 37693f217f8c
parent 629 b13bcfd2f9b1
child 674 835f5f454595
equal deleted inserted replaced
641:fa45fe371faf 642:37693f217f8c
    58 
    58 
    59     list.push(obj);
    59     list.push(obj);
    60   }
    60   }
    61   
    61   
    62   var idList = IriSP.underscore.pluck(list, "id").sort();
    62   var idList = IriSP.underscore.pluck(list, "id").sort();
    63   
    63 
    64   if (idList.length !== this.__oldList.length) {
    64   if (idList.length !== this.__oldList.length) {
    65     this.do_redraw(list);
    65     this.do_redraw(list);
    66   }
    66   }
    67     
    67     
    68   var res = 1;
    68   var res = 1;
    89 };
    89 };
    90 
    90 
    91 IriSP.AnnotationsListWidget.prototype.draw = function() {
    91 IriSP.AnnotationsListWidget.prototype.draw = function() {
    92 
    92 
    93   this.drawList();
    93   this.drawList();
    94   this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation", IriSP.wrap(this, function() { this.redraw(true); }));
    94   this._Popcorn.listen("IriSP.createAnnotationWidget.addedAnnotation", IriSP.wrap(this, function() { this.drawList(true); }));
    95   this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.redraw));
    95   this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.redraw));
    96 };
    96 };
    97 
    97 
    98 IriSP.AnnotationsListWidget.prototype.redraw = function() {
    98 IriSP.AnnotationsListWidget.prototype.redraw = function() {
    99   this.drawList();
    99   this.drawList();