//>>built define("dojox/sketch/PreexistingAnnotation", ["dojo/_base/kernel", "dojo/_base/lang", "./Annotation", "./Anchor"], function(dojo){ dojo.getObject("sketch", true, dojox); var ta=dojox.sketch; ta.PreexistingAnnotation=function(figure, id){ ta.Annotation.call(this, figure, id); this.transform={dx:0, dy:0}; this.start={ x:0, y:0 }; this.end={ x:200, y:200 }; this.radius=8; this.textPosition={ x:196, y:196 }; this.textOffset=4; this.textAlign="end"; //this.property('label',this.id); this.rectShape=null; this.labelShape=null; this.anchors.start=new ta.Anchor(this, "start"); this.anchors.end=new ta.Anchor(this, "end"); }; ta.PreexistingAnnotation.prototype=new ta.Annotation; var p=ta.PreexistingAnnotation.prototype; p.constructor=ta.PreexistingAnnotation; p.type=function(){ return 'Preexisting' }; p.getType=function(){ return ta.PreexistingAnnotation; }; p._pos=function(){ var x=Math.min(this.start.x, this.end.x); var y=Math.min(this.start.y, this.end.y); var w=Math.max(this.start.x, this.end.x); var h=Math.max(this.start.y, this.end.y); this.start={ x:x, y:y }; this.end={ x:w, y:h }; this.textPosition={ x:this.end.x-this.textOffset, y:this.end.y-this.textOffset }; }; p.apply=function(obj){ if(!obj){ return; } if(obj.documentElement){ obj=obj.documentElement; } this.readCommonAttrs(obj); for(var i=0; i' + '' + '' + this.property('label') + '' + ''; }; ta.Annotation.register("Preexisting"); return dojox.sketch.PreexistingAnnotation; });