# HG changeset patch # User durandn # Date 1437575644 -7200 # Node ID 03796d1f704ca50262563eaa12ddb396f9493cb3 # Parent 61f03beb9f3918f28856749b989b31641734bfcb Added a no-tooltip option for Segments diff -r 61f03beb9f39 -r 03796d1f704c server/src/remie/static/remie/metadataplayer/Segments.js --- a/server/src/remie/static/remie/metadataplayer/Segments.js Wed Jul 22 16:33:38 2015 +0200 +++ b/server/src/remie/static/remie/metadataplayer/Segments.js Wed Jul 22 16:34:04 2015 +0200 @@ -13,7 +13,8 @@ background: "#e0e0e0", overlap: .25, found_color: "#FF00FC", - faded_found_color: "#ff80fc" + faded_found_color: "#ff80fc", + no_tooltip: false }; IriSP.Widgets.Segments.prototype.template = @@ -145,15 +146,17 @@ background : this.background, margin: "1px 0" }); - this.insertSubwidget( - this.$.find(".Ldt-Segments-Tooltip"), - { - type: "Tooltip", - min_x: 0, - max_x: this.width - }, - "tooltip" - ); + if (!this.no_tooltip){ + this.insertSubwidget( + this.$.find(".Ldt-Segments-Tooltip"), + { + type: "Tooltip", + min_x: 0, + max_x: this.width + }, + "tooltip" + ); + } this.$segments = this.$.find('.Ldt-Segments-Segment'); this.source.getAnnotations().on("search", function() { searching = true; @@ -167,9 +170,10 @@ }); }; -IriSP.Widgets.Segments.prototype.onTimeupdate = function(_time) { +IriSP.Widgets.Segments.prototype.onTimeupdate = function(_time) { var _x = Math.floor( this.width * _time / this.media.duration); this.$.find('.Ldt-Segments-Position').css({ left: _x + "px" }); -}; \ No newline at end of file +}; +