//>>built define("dojox/sketch/DoubleArrowAnnotation",["dojo/_base/kernel","dojo/_base/lang","./Annotation","./Anchor"],function(_1){ _1.getObject("sketch",true,dojox); var ta=dojox.sketch; ta.DoubleArrowAnnotation=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=6; this.textYOffset=10; this.textAlign="middle"; this.startRotation=0; this.endRotation=0; this.labelShape=null; this.pathShape=null; this.startArrow=null; this.startArrowGroup=null; this.endArrow=null; this.endArrowGroup=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.DoubleArrowAnnotation.prototype=new ta.Annotation; var p=ta.DoubleArrowAnnotation.prototype; p.constructor=ta.DoubleArrowAnnotation; p.type=function(){ return "DoubleArrow"; }; p.getType=function(){ return ta.DoubleArrowAnnotation; }; p._rot=function(){ var _3=this.control.y-this.start.y; var _4=this.control.x-this.start.x; this.startRotation=Math.atan2(_3,_4); _3=this.end.y-this.control.y; _4=this.end.x-this.control.x; this.endRotation=Math.atan2(_3,_4); }; p._pos=function(){ var _5=this.textOffset; if(this.control.y1?20:Math.floor(20/pct),w=pct>1?5:Math.floor(5/pct),h=pct>1?3:Math.floor(3/pct); this.startArrow.setShape("M0,0 l"+l+",-"+w+" -"+h+","+w+" "+h+","+w+" Z"); this.endArrow.setShape("M"+this.end.x+","+this.end.y+" l-"+l+",-"+w+" "+h+","+w+" -"+h+","+w+" Z"); } }; p.getBBox=function(){ var x=Math.min(this.start.x,this.control.x,this.end.x); var y=Math.min(this.start.y,this.control.y,this.end.y); var w=Math.max(this.start.x,this.control.x,this.end.x)-x; var h=Math.max(this.start.y,this.control.y,this.end.y)-y; return {x:x,y:y,width:w,height:h}; }; p.serialize=function(){ var s=this.property("stroke"); return ""+""+""+""+""+""+""+""+""+this.property("label")+""+""; }; ta.Annotation.register("DoubleArrow"); return dojox.sketch.DoubleArrowAnnotation; });