//>>built define("dojox/sketch/LeadAnnotation",["dojo/_base/kernel","dojo/_base/lang","./Annotation","./Anchor"],function(_1){ _1.getObject("sketch",true,dojox); var ta=dojox.sketch; ta.LeadAnnotation=function(_2,id){ ta.Annotation.call(this,_2,id); this.transform={dx:0,dy:0}; this.start={x:0,y:0}; this.control={x:100,y:-50}; this.end={x:200,y:0}; this.textPosition={x:0,y:0}; this.textOffset=4; this.textYOffset=10; this.pathShape=null; this.labelShape=null; this.anchors.start=new ta.Anchor(this,"start"); this.anchors.control=new ta.Anchor(this,"control"); this.anchors.end=new ta.Anchor(this,"end"); }; ta.LeadAnnotation.prototype=new ta.Annotation; var p=ta.LeadAnnotation.prototype; p.constructor=ta.LeadAnnotation; p.type=function(){ return "Lead"; }; p.getType=function(){ return ta.LeadAnnotation; }; p._pos=function(){ var _3=this.textOffset,x=0,y=0; var _4=this.calculate.slope(this.control,this.end); this.textAlign="middle"; if(Math.abs(_4)>=1){ x=this.end.x+this.calculate.dx(this.control,this.end,_3); if(this.control.y>this.end.y){ y=this.end.y-_3; }else{ y=this.end.y+_3+this.textYOffset; } }else{ if(_4==0){ x=this.end.x+_3; y=this.end.y+this.textYOffset; }else{ if(this.start.x>this.end.x){ x=this.end.x-_3; this.textAlign="end"; }else{ x=this.end.x+_3; this.textAlign="start"; } if(this.start.y"+""+""+this.property("label")+""+""; }; ta.Annotation.register("Lead"); return dojox.sketch.LeadAnnotation; });