//>>built // wrapped by build app define("dojox/drawing/tools/Line", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){ dojo.provide("dojox.drawing.tools.Line"); dojox.drawing.tools.Line = dojox.drawing.util.oo.declare( // summary: // Class for a drawable Line dojox.drawing.stencil.Line, function(){ // summary: constructor }, { draws:true, showAngle:true, onTransformEnd: function(/*manager.Anchor*/anchor){ // summary: // Overwrites _Base.onTransformEnd // this._toggleSelected(); if(this.getRadius()x1 ? ((x2-x1)/2) : ((x1-x2)/-2); var dy = y2>y1 ? ((y2-y1)/2) : ((y1-y2)/-2); x1 -= dx; x2 -= dx; y1 -= dy; y2 -= dy; } this.setPoints([ {x:x1, y:y1}, {x:x2, y:y2} ]); this.render(); }, onUp: function(/*EventObject*/obj){ // summary: See stencil._Base.onUp // if(this.created || !this._downOnCanvas){ return; } this._downOnCanvas = false; //Default shape on single click if(!this.shape){ var s = obj.start, e = this.minimumSize*4; this.setPoints([ {x:s.x, y:s.y+e}, {x:s.x, y:s.y} ]); this.render(); }else{ // if too small, need to reset if(this.getRadius()