From 1c5685d68f1b73270fb814fe04cbb490eb90ba5f Mon Sep 17 00:00:00 2001 From: mensonge Date: Fri, 14 Nov 2008 15:39:19 +0000 Subject: Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library) git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dojox/sketch/SingleArrowAnnotation.js | 183 ---------------------- 1 file changed, 183 deletions(-) delete mode 100644 includes/js/dojox/sketch/SingleArrowAnnotation.js (limited to 'includes/js/dojox/sketch/SingleArrowAnnotation.js') diff --git a/includes/js/dojox/sketch/SingleArrowAnnotation.js b/includes/js/dojox/sketch/SingleArrowAnnotation.js deleted file mode 100644 index 29ad7f0..0000000 --- a/includes/js/dojox/sketch/SingleArrowAnnotation.js +++ /dev/null @@ -1,183 +0,0 @@ -if(!dojo._hasResource["dojox.sketch.SingleArrowAnnotation"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dojox.sketch.SingleArrowAnnotation"] = true; -dojo.provide("dojox.sketch.SingleArrowAnnotation"); -dojo.require("dojox.sketch.Annotation"); -dojo.require("dojox.sketch.Anchor"); - -(function(){ - var ta=dojox.sketch; - ta.SingleArrowAnnotation=function(figure, id){ - ta.Annotation.call(this, figure, 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.textAlign="middle"; - this.textYOffset=10; - this.rotation=0; - -// this.property('label',this.id); -// this.label=this.id; - this.pathShape=null; - this.arrowhead=null; - this.arrowheadGroup=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.SingleArrowAnnotation.prototype=new ta.Annotation; - var p=ta.SingleArrowAnnotation.prototype; - p.constructor=ta.SingleArrowAnnotation; - - p.type=function(){ return 'SingleArrow'; }; - p.getType=function(){ return ta.SingleArrowAnnotation; }; - - // helper functions - p._rot=function(){ - // arrowhead rotation - var opp=this.start.y-this.control.y; - var adj=this.start.x-this.control.x; - if(!adj) adj=1; - this.rotation=Math.atan(opp/adj); - }; - p._pos=function(){ - // text position - var offset=this.textOffset, x=0, y=0; - var slope=this.calculate.slope(this.control, this.end); - if(Math.abs(slope)>=1){ - x=this.end.x+this.calculate.dx(this.control, this.end, offset); - if(this.control.y>this.end.y) y=this.end.y-offset; - else y=this.end.y+offset+this.textYOffset; - } else if(slope==0){ - x=this.end.x+offset; - y=this.end.y+this.textYOffset; - } else { - if(this.start.x>this.end.x){ - x=this.end.x-offset; - this.textAlign="end"; - } else { - x=this.end.x+offset; - this.textAlign="start"; - } - if(this.start.y=this.end.x&&this.control.xthis.end.x) r-=180; - r=Math.round(r*Math.pow(10,4))/Math.pow(10,4); - return '' - + '' - + '' - + '' - + '' - + '' - + this.property('label') - + '' - + ''; - }; - - ta.Annotation.register("SingleArrow"); -})(); - -} -- cgit v1.2.3