equal
deleted
inserted
replaced
1 IriSP.StackGraphWidget = function(Popcorn, config, Serializer) { |
1 IriSP.StackGraphWidget = function(Popcorn, config, Serializer) { |
2 IriSP.Widget.call(this, Popcorn, config, Serializer); |
2 IriSP.Widget.call(this, Popcorn, config, Serializer); |
3 } |
3 }; |
4 |
4 |
5 IriSP.StackGraphWidget.prototype = new IriSP.Widget(); |
5 IriSP.StackGraphWidget.prototype = new IriSP.Widget(); |
6 |
6 |
7 IriSP.StackGraphWidget.prototype.draw = function() { |
7 IriSP.StackGraphWidget.prototype.draw = function() { |
8 var _defaultTags = [ |
8 var _defaultTags = [ |
164 _this.TooltipWidget.hide(); |
164 _this.TooltipWidget.hide(); |
165 _this.rectangleFocus.attr({ |
165 _this.rectangleFocus.attr({ |
166 "opacity" : 0, |
166 "opacity" : 0, |
167 }) |
167 }) |
168 }) |
168 }) |
169 } |
169 }; |
170 |
170 |
171 IriSP.StackGraphWidget.prototype.timeUpdateHandler = function() { |
171 IriSP.StackGraphWidget.prototype.timeUpdateHandler = function() { |
172 var _currentTime = this._Popcorn.currentTime(), |
172 var _currentTime = this._Popcorn.currentTime(), |
173 _x = (1000 * _currentTime / this.duration) * this.width; |
173 _x = (1000 * _currentTime / this.duration) * this.width; |
174 this.rectangleProgress.attr({ |
174 this.rectangleProgress.attr({ |
175 "width" : _x, |
175 "width" : _x, |
176 }); |
176 }); |
177 this.ligneProgress.attr({ |
177 this.ligneProgress.attr({ |
178 "path" : "M" + _x + " 0L" + _x + " " + this.height, |
178 "path" : "M" + _x + " 0L" + _x + " " + this.height, |
179 }) |
179 }) |
180 } |
180 }; |
181 |
181 |
182 IriSP.StackGraphWidget.prototype.clickHandler = function(event) { |
182 IriSP.StackGraphWidget.prototype.clickHandler = function(event) { |
183 /* Ctrl-C Ctrl-V'ed from another widget |
183 /* Ctrl-C Ctrl-V'ed from another widget |
184 */ |
184 */ |
185 |
185 |
207 this.TooltipWidget.selector.find(".tip").html(_html); |
207 this.TooltipWidget.selector.find(".tip").html(_html); |
208 this.rectangleFocus.attr({ |
208 this.rectangleFocus.attr({ |
209 "x" : _segment * _width, |
209 "x" : _segment * _width, |
210 "opacity" : .4, |
210 "opacity" : .4, |
211 }) |
211 }) |
212 } |
212 }; |
213 |
213 |