equal
deleted
inserted
replaced
196 this._Popcorn.trigger("IriSP.StackGraphWidget.clicked", newTime); |
196 this._Popcorn.trigger("IriSP.StackGraphWidget.clicked", newTime); |
197 this._Popcorn.currentTime(newTime); |
197 this._Popcorn.currentTime(newTime); |
198 }; |
198 }; |
199 |
199 |
200 IriSP.StackGraphWidget.prototype.updateTooltip = function(event) { |
200 IriSP.StackGraphWidget.prototype.updateTooltip = function(event) { |
201 var _segment = ~~(this.sliceCount * (event.pageX - this.selector.offset().left)/this.width), |
201 var _segment = Math.floor(this.sliceCount * (event.pageX - this.selector.offset().left)/this.width), |
202 _valeurs = this.groups[_segment], |
202 _valeurs = this.groups[_segment], |
203 _width = this.width / this.sliceCount, |
203 _width = this.width / this.sliceCount, |
204 _html = '<ul style="list-style: none; margin: 0; padding: 0;">' + IriSP._(this.tagconf).map(function(_tag, _i) { |
204 _html = '<ul style="list-style: none; margin: 0; padding: 0;">' + IriSP._(this.tagconf).map(function(_tag, _i) { |
205 return '<li style="clear: both;"><span style="float: left; width: 10px; height: 10px; margin: 2px; background: ' |
205 return '<li style="clear: both;"><span style="float: left; width: 10px; height: 10px; margin: 2px; background: ' |
206 + _tag.color |
206 + _tag.color |
209 + '% de ' |
209 + '% de ' |
210 + _tag.description |
210 + _tag.description |
211 + '</li>'; |
211 + '</li>'; |
212 }).join('') + '</ul>'; |
212 }).join('') + '</ul>'; |
213 this.TooltipWidget._shown = false; // Vraiment, on ne peut pas ouvrir le widget s'il n'est pas encore ouvert ? |
213 this.TooltipWidget._shown = false; // Vraiment, on ne peut pas ouvrir le widget s'il n'est pas encore ouvert ? |
214 this.TooltipWidget.show('','',event.pageX - 105, event.pageY - 160); |
214 this.TooltipWidget.show('','',(_segment + .5)* this.width / this.sliceCount, 0); |
215 this.TooltipWidget.selector.find(".tip").html(_html); |
215 this.TooltipWidget.selector.find(".tip").html(_html); |
216 this.rectangleFocus.attr({ |
216 this.rectangleFocus.attr({ |
217 "x" : _segment * _width, |
217 "x" : _segment * _width, |
218 "opacity" : .4 |
218 "opacity" : .4 |
219 }) |
219 }) |