# HG changeset patch # User veltr # Date 1372863883 -7200 # Node ID cf0f2339169ec9b5f9a59ec5e1602254ed5395a0 # Parent a4dc93a91a95b7387bf2f4893071ea8f79efc47a Improvements for SPEL diff -r a4dc93a91a95 -r cf0f2339169e src/widgets/Annotation.js --- a/src/widgets/Annotation.js Wed Jun 19 18:54:46 2013 +0200 +++ b/src/widgets/Annotation.js Wed Jul 03 17:04:43 2013 +0200 @@ -48,6 +48,7 @@ annotation_type : "chap", start_minimized: false, show_arrow : true, + arrow_position: .5, site_name : "Lignes de Temps", search_on_tag_click: true, show_social: true, @@ -140,7 +141,7 @@ _this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty"); _this.bounds = [ _annotation.begin, _annotation.end ]; if (_this.arrow) { - _this.arrow.moveToTime((_annotation.begin + _annotation.end)/2); + _this.arrow.moveToTime((1 - _this.arrow_position) * _annotation.begin + _this.arrow_position * _annotation.end); } _this.sendBounds(); } @@ -151,7 +152,9 @@ this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget"); } - this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow"); + if (this.show_arrow) { + this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow"); + } this.onMediaEvent("timeupdate",timeupdate); this.onMdpEvent("Annotation.hide","hide"); this.onMdpEvent("Annotation.show","show"); diff -r a4dc93a91a95 -r cf0f2339169e src/widgets/Polemic.js --- a/src/widgets/Polemic.js Wed Jun 19 18:54:46 2013 +0200 +++ b/src/widgets/Polemic.js Wed Jul 03 17:04:43 2013 +0200 @@ -81,7 +81,7 @@ begin : _begin.toString(), end : _end.toString(), annotations : _list.filter(function(_annotation) { - return _annotation.begin >= _begin && _annotation.end < _end; + return _annotation.begin >= _begin && _annotation.begin < _end; }), polemicStacks : [] } @@ -134,6 +134,7 @@ _annotation.trigger("unselect"); }).click(function() { _annotation.trigger("click"); + return false; }); IriSP.attachDndData(_el, { title: _annotation.title,