src/widgets/Arrow.js
changeset 961 e1baacb52075
parent 957 4da0a5740b6c
child 965 eadb7290c325
equal deleted inserted replaced
956:7c1d08cf6956 961:e1baacb52075
    31         stroke: this.stroke_color,
    31         stroke: this.stroke_color,
    32         "stroke-width": this.stroke_width,
    32         "stroke-width": this.stroke_width,
    33         fill: this.fill_url ? ( 'url(' + this.fill_url + ')' ) : this.fill_color
    33         fill: this.fill_url ? ( 'url(' + this.fill_url + ')' ) : this.fill_color
    34     });
    34     });
    35     this.moveTo(0);
    35     this.moveTo(0);
    36     this.bindPopcorn("IriSP.Arrow.updatePosition","onUpdatePosition");
    36     this.onMdpEvent("Arrow.updatePosition","onUpdatePosition");
    37     this.bindPopcorn("IriSP.Arrow.takeover","onTakeover");
    37     this.onMdpEvent("Arrow.takeover","onTakeover");
    38     this.bindPopcorn("IriSP.Arrow.release","onRelease");
    38     this.onMdpEvent("Arrow.release","onRelease");
    39 }
    39 }
    40 
    40 
    41 IriSP.Widgets.Arrow.prototype.drawAt = function(_x) {
    41 IriSP.Widgets.Arrow.prototype.drawAt = function(_x) {
    42     _x = Math.floor(Math.max(0, Math.min(_x, this.width)));
    42     _x = Math.floor(Math.max(0, Math.min(_x, this.width)));
    43     var _d = 'M0,' + this.height
    43     var _d = 'M0,' + this.height