src/widgets/Annotation.js
changeset 1004 cf0f2339169e
parent 1002 a86208b60c91
child 1007 639129cf95bc
equal deleted inserted replaced
1003:a4dc93a91a95 1004:cf0f2339169e
    46 
    46 
    47 IriSP.Widgets.Annotation.prototype.defaults = {
    47 IriSP.Widgets.Annotation.prototype.defaults = {
    48     annotation_type : "chap",
    48     annotation_type : "chap",
    49     start_minimized: false,
    49     start_minimized: false,
    50     show_arrow : true,
    50     show_arrow : true,
       
    51     arrow_position: .5,
    51     site_name : "Lignes de Temps",
    52     site_name : "Lignes de Temps",
    52     search_on_tag_click: true,
    53     search_on_tag_click: true,
    53     show_social: true,
    54     show_social: true,
    54     show_annotation_type: false
    55     show_annotation_type: false
    55 }
    56 }
   138             },800);
   139             },800);
   139         }
   140         }
   140         _this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty");
   141         _this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty");
   141         _this.bounds = [ _annotation.begin, _annotation.end ];
   142         _this.bounds = [ _annotation.begin, _annotation.end ];
   142         if (_this.arrow) {
   143         if (_this.arrow) {
   143             _this.arrow.moveToTime((_annotation.begin + _annotation.end)/2);
   144             _this.arrow.moveToTime((1 - _this.arrow_position) * _annotation.begin + _this.arrow_position * _annotation.end);
   144         }
   145         }
   145         _this.sendBounds();
   146         _this.sendBounds();
   146     }
   147     }
   147     
   148     
   148     this.renderTemplate();
   149     this.renderTemplate();
   149     
   150     
   150     if (this.show_social) {
   151     if (this.show_social) {
   151         this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget");
   152         this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget");
   152     }
   153     }
   153     
   154     
   154     this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow");
   155     if (this.show_arrow) {
       
   156         this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow");
       
   157     }
   155     this.onMediaEvent("timeupdate",timeupdate);
   158     this.onMediaEvent("timeupdate",timeupdate);
   156     this.onMdpEvent("Annotation.hide","hide");
   159     this.onMdpEvent("Annotation.hide","hide");
   157     this.onMdpEvent("Annotation.show","show");
   160     this.onMdpEvent("Annotation.show","show");
   158     this.onMdpEvent("Annotation.minimize","minimize");
   161     this.onMdpEvent("Annotation.minimize","minimize");
   159     this.onMdpEvent("Annotation.maximize","maximize");
   162     this.onMdpEvent("Annotation.maximize","maximize");