UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 3.56 kB
function mxShapeC4Person(e,o,r,t){mxShape.call(this),this.bounds=e,this.fill=o,this.stroke=r,this.strokewidth=null!=t?t:1}function mxShapeC4Person2(e,o,r,t){mxShape.call(this),this.bounds=e,this.fill=o,this.stroke=r,this.strokewidth=null!=t?t:1}function mxShapeC4WebBrowserContainer(e,o,r,t){mxShape.call(this),this.bounds=e,this.fill=o,this.stroke=r,this.strokewidth=null!=t?t:1}mxUtils.extend(mxShapeC4Person,mxShape),mxShapeC4Person.prototype.cst={PERSONSHAPE:"mxgraph.c4.person"},mxShapeC4Person.prototype.paintVertexShape=function(e,o,r,t,n){e.translate(o,r);var a=Math.min(t/2,n/3),i=a/2;e.ellipse(.5*t-.5*a,0,a,a),e.fillAndStroke(),e.begin(),e.moveTo(0,.8*a+i),e.arcTo(i,i,0,0,1,i,.8*a),e.lineTo(t-i,.8*a),e.arcTo(i,i,0,0,1,t,.8*a+i),e.lineTo(t,n-i),e.arcTo(i,i,0,0,1,t-i,n),e.lineTo(i,n),e.arcTo(i,i,0,0,1,0,n-i),e.close(),e.fillAndStroke(),e.setShadow(!1),e.ellipse(.5*t-.5*a,0,a,a),e.fillAndStroke()},mxShapeC4Person.prototype.getLabelMargins=function(e){var o=Math.min(e.width/2,e.height/3);return new mxRectangle(0,.8*o,0,0)},mxCellRenderer.registerShape(mxShapeC4Person.prototype.cst.PERSONSHAPE,mxShapeC4Person),mxUtils.extend(mxShapeC4Person2,mxShape),mxShapeC4Person2.prototype.cst={PERSONSHAPE:"mxgraph.c4.person2"},mxShapeC4Person2.prototype.paintVertexShape=function(e,o,r,t,n){e.translate(o,r);var a=Math.min(.45*t,.45*n),i=a/2;e.ellipse(.5*t-.5*a,0,a,a),e.fillAndStroke(),e.begin(),e.moveTo(0,.8*a+i),e.arcTo(i,i,0,0,1,i,.8*a),e.lineTo(t-i,.8*a),e.arcTo(i,i,0,0,1,t,.8*a+i),e.lineTo(t,n-i),e.arcTo(i,i,0,0,1,t-i,n),e.lineTo(i,n),e.arcTo(i,i,0,0,1,0,n-i),e.close(),e.fillAndStroke(),e.setShadow(!1),e.ellipse(.5*t-.5*a,0,a,a),e.fillAndStroke()},mxShapeC4Person2.prototype.getLabelMargins=function(e){var o=Math.min(.45*e.width,.45*e.height);return new mxRectangle(0,.8*o,0,0)},mxCellRenderer.registerShape(mxShapeC4Person2.prototype.cst.PERSONSHAPE,mxShapeC4Person2),mxUtils.extend(mxShapeC4WebBrowserContainer,mxShape),mxShapeC4WebBrowserContainer.prototype.cst={WEB_BROWSER_CONTAINER_SHAPE:"mxgraph.c4.webBrowserContainer"},mxShapeC4WebBrowserContainer.prototype.paintVertexShape=function(e,o,r,t,n){e.translate(o,r),e.begin(),e.moveTo(0,8),e.arcTo(8,8,0,0,1,8,0),e.lineTo(t-8,0),e.arcTo(8,8,0,0,1,t,8),e.lineTo(t,n-8),e.arcTo(8,8,0,0,1,t-8,n),e.lineTo(8,n),e.arcTo(8,8,0,0,1,0,n-8),e.close(),e.fillAndStroke(),e.setShadow(!1);var a=12;t>61&&n>39&&(e.setFillColor("#23A2D9"),e.begin(),e.moveTo(5,8),e.arcTo(3,3,0,0,1,8,5),e.lineTo(t-36-20-3,5),e.arcTo(3,3,0,0,1,t-36-20,8),e.lineTo(t-36-20,14),e.arcTo(3,3,0,0,1,t-36-20-3,17),e.lineTo(8,17),e.arcTo(3,3,0,0,1,5,14),e.close(),e.moveTo(t-36-15,8),e.arcTo(3,3,0,0,1,t-36-15+3,5),e.lineTo(t-24-15-3,5),e.arcTo(3,3,0,0,1,t-24-15,8),e.lineTo(t-24-15,14),e.arcTo(3,3,0,0,1,t-24-15-3,17),e.lineTo(t-36-15+3,17),e.arcTo(3,3,0,0,1,t-36-15,14),e.close(),e.moveTo(t-24-10,8),e.arcTo(3,3,0,0,1,t-24-10+3,5),e.lineTo(t-a-10-3,5),e.arcTo(3,3,0,0,1,t-a-10,8),e.lineTo(t-a-10,14),e.arcTo(3,3,0,0,1,t-a-10-3,17),e.lineTo(t-24-10+3,17),e.arcTo(3,3,0,0,1,t-24-10,14),e.close(),e.moveTo(t-a-5,8),e.arcTo(3,3,0,0,1,t-a-5+3,5),e.lineTo(t-5-3,5),e.arcTo(3,3,0,0,1,t-5,8),e.lineTo(t-5,14),e.arcTo(3,3,0,0,1,t-5-3,17),e.lineTo(t-a-5+3,17),e.arcTo(3,3,0,0,1,t-a-5,14),e.close(),e.moveTo(5,30),e.arcTo(8,8,0,0,1,13,22),e.lineTo(t-8-5,22),e.arcTo(8,8,0,0,1,t-5,30),e.lineTo(t-5,n-8-5),e.arcTo(8,8,0,0,1,t-8-5,n-5),e.lineTo(13,n-5),e.arcTo(8,8,0,0,1,5,n-8-5),e.close(),e.fill(),e.fill())},mxCellRenderer.registerShape(mxShapeC4WebBrowserContainer.prototype.cst.WEB_BROWSER_CONTAINER_SHAPE,mxShapeC4WebBrowserContainer);