@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 3.17 kB
JavaScript
function mxShapeMockupCurlyBrace(e,o,t,p){mxShape.call(this),this.bounds=e,this.fill=o,this.stroke=t,this.strokewidth=null!=p?p:1}function mxShapeMockupLine(e,o,t,p){mxShape.call(this),this.bounds=e,this.fill=o,this.stroke=t,this.strokewidth=null!=p?p:1}function mxShapeMockupScratchOut(e,o,t,p){mxShape.call(this),this.bounds=e,this.fill=o,this.stroke=t,this.strokewidth=null!=p?p:1}function mxShapeMockupRedX(e,o,t,p){mxShape.call(this),this.bounds=e,this.fill=o,this.stroke=t,this.strokewidth=null!=p?p:1}mxUtils.extend(mxShapeMockupCurlyBrace,mxShape),mxShapeMockupCurlyBrace.prototype.cst={SHAPE_CURLY_BRACE:"mxgraph.mockup.markup.curlyBrace"},mxShapeMockupCurlyBrace.prototype.paintVertexShape=function(e,o,t,p,r){e.translate(o,t),this.background(e,o,t,p,r)},mxShapeMockupCurlyBrace.prototype.background=function(e,o,t,p,r){var c=.5*r,a=Math.min(.125*p,c);e.begin(),e.moveTo(0,c+a),e.arcTo(a,a,0,0,1,a,c),e.lineTo(.5*p-a,c),e.arcTo(a,a,0,0,0,.5*p,c-a),e.arcTo(a,a,0,0,0,.5*p+a,c),e.lineTo(p-a,c),e.arcTo(a,a,0,0,1,p,c+a),e.stroke()},mxCellRenderer.registerShape(mxShapeMockupCurlyBrace.prototype.cst.SHAPE_CURLY_BRACE,mxShapeMockupCurlyBrace),mxUtils.extend(mxShapeMockupLine,mxShape),mxShapeMockupLine.prototype.cst={SHAPE_LINE:"mxgraph.mockup.markup.line"},mxShapeMockupLine.prototype.paintVertexShape=function(e,o,t,p,r){e.translate(o,t),e.begin(),e.moveTo(0,.5*r),e.lineTo(p,.5*r),e.stroke()},mxCellRenderer.registerShape(mxShapeMockupLine.prototype.cst.SHAPE_LINE,mxShapeMockupLine),mxUtils.extend(mxShapeMockupScratchOut,mxShape),mxShapeMockupScratchOut.prototype.cst={SHAPE_SCRATCH_OUT:"mxgraph.mockup.markup.scratchOut"},mxShapeMockupScratchOut.prototype.paintVertexShape=function(e,o,t,p,r){e.translate(o,t),e.begin(),e.moveTo(.038*p,.095*r),e.curveTo(.038*p,.095*r,.289*p,-.045*r,.186*p,.05*r),e.curveTo(.084*p,.145*r,-.046*p,.251*r,.072*p,.208*r),e.curveTo(.191*p,.164*r,.522*p,-.09*r,.366*p,.062*r),e.curveTo(.21*p,.215*r,-.094*p,.38*r,.108*p,.304*r),e.curveTo(.309*p,.228*r,.73*p,-.126*r,.544*p,.096*r),e.curveTo(.358*p,.319*r,-.168*p,.592*r,.108*p,.476*r),e.curveTo(.382*p,.36*r,.972*p,-.138*r,.779*p,.114*r),e.curveTo(.585*p,.365*r,-.12*p,.688*r,.071*p,.639*r),e.curveTo(.262*p,.59*r,1.174*p,.012*r,.936*p,.238*r),e.curveTo(.699*p,.462*r,-.216*p,.855*r,.085*p,.806*r),e.curveTo(.386*p,.758*r,1.185*p,.26*r,.935*p,.534*r),e.curveTo(.685*p,.808*r,-.186*p,.94*r,.236*p,.895*r),e.curveTo(.659*p,.85*r,1.095*p,.608*r,.905*p,.769*r),e.curveTo(.715*p,.93*r,.286*p,.962*r,.661*p,.931*r),e.stroke()},mxCellRenderer.registerShape(mxShapeMockupScratchOut.prototype.cst.SHAPE_SCRATCH_OUT,mxShapeMockupScratchOut),mxUtils.extend(mxShapeMockupRedX,mxShape),mxShapeMockupRedX.prototype.cst={SHAPE_RED_X:"mxgraph.mockup.markup.redX"},mxShapeMockupRedX.prototype.paintVertexShape=function(e,o,t,p,r){e.translate(o,t),e.begin(),e.moveTo(.1*p,0),e.lineTo(.5*p,.4*r),e.lineTo(.9*p,0),e.lineTo(p,.1*r),e.lineTo(.6*p,.5*r),e.lineTo(p,.9*r),e.lineTo(.9*p,r),e.lineTo(.5*p,.6*r),e.lineTo(.1*p,r),e.lineTo(0,.9*r),e.lineTo(.4*p,.5*r),e.lineTo(0,.1*r),e.close(),e.fillAndStroke()},mxCellRenderer.registerShape(mxShapeMockupRedX.prototype.cst.SHAPE_RED_X,mxShapeMockupRedX);