a:20:{s:9:"#provides";s:19:"dojox.sketch.Anchor";s:9:"#resource";s:16:"sketch/Anchor.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:9:"dojox.gfx";}}s:25:"dojox.sketch.Anchor.count";a:1:{s:7:"summary";s:0:"";}s:19:"dojox.sketch.Anchor";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:2:"an";a:1:{s:4:"type";s:0:"";}s:2:"id";a:1:{s:4:"type";s:0:"";}s:9:"isControl";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1657:" 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.zoom=function(pct){ if(this.shape){ var rs=Math.floor(size/pct); var width=dojox.gfx.renderer=='vml'?1:1/pct this.shape.setShape({ x:an[id].x-rs, y:an[id].y-rs, width:rs*2, height:rs*2 }).setStroke({ color:"black", width:width }); //For IE, maybe we need Math.ceil(1/pct)||1 } } /*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.zoom(an.figure.zoomFactor); }; this.disable=function(){ an.figure._remove(this); if(an.shape){ an.shape.remove(this.shape); } this.shape=null; rect=null; };";s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:30:"dojox.sketch.Anchor.annotation";a:2:{s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:22:"dojox.sketch.Anchor.id";a:2:{s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:24:"dojox.sketch.Anchor._key";a:3:{s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"private";b:1;s:7:"summary";s:0:"";}s:25:"dojox.sketch.Anchor.shape";a:2:{s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:29:"dojox.sketch.Anchor.isControl";a:2:{s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:24:"dojox.sketch.Anchor.type";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:41:" this.type=function(){ return "Anchor"; ";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:29:"dojox.sketch.Anchor.beginEdit";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:53:" this.annotation.beginEdit(ta.CommandTypes.Modify);";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:27:"dojox.sketch.Anchor.endEdit";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:29:" this.annotation.endEdit();";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:24:"dojox.sketch.Anchor.zoom";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"pct";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:274:" if(this.shape){ var rs=Math.floor(size/pct); var width=dojox.gfx.renderer=='vml'?1:1/pct this.shape.setShape({ x:an[id].x-rs, y:an[id].y-rs, width:rs*2, height:rs*2 }).setStroke({ color:"black", width:width }); //For IE, maybe we need Math.ceil(1/pct)||1 }";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:30:"dojox.sketch.Anchor.setBinding";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:2:"pt";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:82:" an[id]={ x: an[id].x+pt.dx, y:an[id].y+pt.dy }; an.draw(); an.drawBBox();";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:27:"dojox.sketch.Anchor.setUndo";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:41:" this.setUndo=function(){ an.setUndo(); ";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:26:"dojox.sketch.Anchor.enable";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:422:" 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.zoom(an.figure.zoomFactor);";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:27:"dojox.sketch.Anchor.disable";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:109:" an.figure._remove(this); if(an.shape){ an.shape.remove(this.shape); } this.shape=null; rect=null;";s:8:"instance";s:19:"dojox.sketch.Anchor";s:7:"summary";s:0:"";}s:12:"dojox.sketch";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}