aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/sketch/Anchor.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/sketch/Anchor.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
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
Diffstat (limited to 'includes/js/dojox/sketch/Anchor.js')
-rw-r--r--includes/js/dojox/sketch/Anchor.js61
1 files changed, 0 insertions, 61 deletions
diff --git a/includes/js/dojox/sketch/Anchor.js b/includes/js/dojox/sketch/Anchor.js
deleted file mode 100644
index de72ac0..0000000
--- a/includes/js/dojox/sketch/Anchor.js
+++ /dev/null
@@ -1,61 +0,0 @@
-if(!dojo._hasResource["dojox.sketch.Anchor"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojox.sketch.Anchor"] = true;
-dojo.provide("dojox.sketch.Anchor");
-dojo.require("dojox.gfx");
-
-(function(){
- var ta=dojox.sketch;
- ta.Anchor=function(an, id, isControl){
- var self=this;
- var size=4; // .5 * size of anchor.
- var rect=null;
-
- this.type=function(){ return "Anchor"; };
- this.annotation=an;
-
- this.id=id;
- this._key="anchor-" + ta.Anchor.count++;
- this.shape=null;
- this.isControl=(isControl!=null)?isControl:true;
-
- this.beginEdit=function(){
- this.annotation.beginEdit(ta.CommandTypes.Modify);
- };
- this.endEdit=function(){
- this.annotation.endEdit();
- };
- this.doChange=function(pt){
- if(this.isControl) this.shape.applyTransform(pt);
- else{
- an.transform.dx+=pt.dx;
- an.transform.dy+=pt.dy;
- }
- };
- this.setBinding=function(pt){
- an[id]={ x: an[id].x+pt.dx, y:an[id].y+pt.dy };
- an.draw();
- an.drawBBox();
- };
- this.setUndo=function(){ an.setUndo(); };
-
- this.enable=function(){
- if(!an.shape) return;
- an.figure._add(this);
- rect={ x:an[id].x-size, y:an[id].y-size, width:size*2, height:size*2 };
- this.shape=an.shape.createRect(rect)
- .setStroke({ color:"black", width:1 })
- .setFill([255,255,255,0.35]);
- this.shape.getEventSource().setAttribute("id", self._key);
- this.shape.getEventSource().setAttribute("shape-rendering", "crispEdges");
- };
- this.disable=function(){
- an.figure._remove(this);
- if(an.shape) an.shape.remove(this.shape);
- this.shape=null;
- rect=null;
- };
- };
- ta.Anchor.count=0;
-})();
-
-}