src/js/widgets/arrowWidget.js
author hamidouk
Wed, 23 Nov 2011 11:14:01 +0100
branchpopcorn-port
changeset 305 e8d05c3f77ed
parent 299 d2005f747d5a
child 313 7df805ebb75e
permissions -rw-r--r--
created an arrow widget.

IriSP.ArrowWidget = function(Popcorn, config, Serializer) {
  IriSP.Widget.call(this, Popcorn, config, Serializer);
  
};


IriSP.ArrowWidget.prototype = new IriSP.Widget();

IriSP.ArrowWidget.prototype.clear = function() {

};

IriSP.ArrowWidget.prototype.clearWidget = function() {
};

IriSP.ArrowWidget.prototype.draw = function() {
  var templ = Mustache.to_html(IriSP.arrowWidget_template, {});
  this.selector.append(templ);
  this._Popcorn.listen("IriSP.SegmentsWidget.segmentClick", IriSP.wrap(this, this.segmentClickHandler));
};

IriSP.ArrowWidget.prototype.segmentClickHandler = function(percents) {
 this.selector.children(".Ldt-arrowWidget").css("left", percents + "%");
}