@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 5.02 kB
JavaScript
function mxShapeAws4ProductIcon(e,t,s,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=s,this.strokewidth=null!=o?o:1}function mxShapeAws4ResourceIcon(e,t,s,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=s,this.strokewidth=null!=o?o:1}function mxShapeAws4Group(e,t,s,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=s,this.strokewidth=null!=o?o:1}function mxShapeAws4GroupCenter(e,t,s,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=s,this.strokewidth=null!=o?o:1}function mxShapeAws4Group2(e,t,s,o){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=s,this.strokewidth=null!=o?o:1}mxUtils.extend(mxShapeAws4ProductIcon,mxShape),mxShapeAws4ProductIcon.prototype.cst={PRODUCT_ICON:"mxgraph.aws4.productIcon"},mxShapeAws4ProductIcon.prototype.paintVertexShape=function(e,t,s,o,l){e.translate(t,s);var i=parseFloat(mxUtils.getValue(this.style,"opacity","100")),r=i,a=i;"none"==h&&(r=0),"none"==p&&(a=0);var n=mxUtils.getValue(this.state.style,"strokeColor","none");e.setFillColor(n),e.begin(),e.moveTo(0,0),e.lineTo(o,0),e.lineTo(o,l),e.lineTo(0,l),e.close(),e.fill(),e.setShadow(!1);var h=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),p=mxUtils.getValue(this.state.style,"gradientColor",h),x=mxUtils.getValue(this.state.style,"gradientDirection","south");e.setFillColor(h),e.setGradient(h,p,0,0,o,l,x,r,a),e.begin(),e.moveTo(1,1),e.lineTo(o-1,1),e.lineTo(o-1,o-1),e.lineTo(1,o-1),e.close(),e.fill();var m=mxUtils.getValue(this.state.style,"prIcon",""),S=mxStencilRegistry.getStencil(m);null!=S&&(e.setFillColor(n),e.setStrokeColor("none"),S.drawShape(e,this,1+.15*o,1+.15*o,.7*o-2,.7*o-2))},mxCellRenderer.registerShape(mxShapeAws4ProductIcon.prototype.cst.PRODUCT_ICON,mxShapeAws4ProductIcon),mxUtils.extend(mxShapeAws4ResourceIcon,mxShape),mxShapeAws4ResourceIcon.prototype.cst={RESOURCE_ICON:"mxgraph.aws4.resourceIcon"},mxShapeAws4ResourceIcon.prototype.paintVertexShape=function(e,t,s,o,l){e.translate(t,s),e.begin(),e.moveTo(0,0),e.lineTo(o,0),e.lineTo(o,l),e.lineTo(0,l),e.close(),e.fill(),e.setShadow(!1);var i=mxUtils.getValue(this.state.style,"resIcon",""),r=mxStencilRegistry.getStencil(i);if(null!=r){var a=mxUtils.getValue(this.state.style,"strokeColor","#000000");e.setFillColor(a),e.setStrokeColor("none"),r.drawShape(e,this,.1*o,.1*l,.8*o,.8*l)}},mxCellRenderer.registerShape(mxShapeAws4ResourceIcon.prototype.cst.RESOURCE_ICON,mxShapeAws4ResourceIcon),mxUtils.extend(mxShapeAws4Group,mxShape),mxShapeAws4Group.prototype.cst={GROUP:"mxgraph.aws4.group"},mxShapeAws4Group.prototype.paintVertexShape=function(e,t,s,o,l){e.translate(t,s);var i=mxUtils.getValue(this.state.style,"grStroke","1"),r=25;null!=this.style&&"0"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")&&(e.pointerEvents=!1),e.begin(),e.moveTo(0,0),e.lineTo(o,0),e.lineTo(o,l),e.lineTo(0,l),e.close(),"1"==i?e.fillAndStroke():e.fill(),e.pointerEvents=!0,e.setShadow(!1);var a=mxUtils.getValue(this.state.style,"grIcon",""),n=mxStencilRegistry.getStencil(a);if(null!=n){var h=mxUtils.getValue(this.state.style,"strokeColor","#000000");r=mxUtils.getValue(this.state.style,"grIconSize",r),e.setFillAlpha(this.strokeOpacity/100),e.setFillColor(h),e.setStrokeColor("none"),n.drawShape(e,this,0,0,r,r)}},mxCellRenderer.registerShape(mxShapeAws4Group.prototype.cst.GROUP,mxShapeAws4Group),mxUtils.extend(mxShapeAws4GroupCenter,mxShape),mxShapeAws4GroupCenter.prototype.cst={GROUP_CENTER:"mxgraph.aws4.groupCenter"},mxShapeAws4GroupCenter.prototype.paintVertexShape=function(e,t,s,o,l){e.translate(t,s);var i=mxUtils.getValue(this.state.style,"grStroke","1"),r=25;e.begin(),e.moveTo(0,0),e.lineTo(o,0),e.lineTo(o,l),e.lineTo(0,l),e.close(),"1"==i?e.fillAndStroke():e.fill(),e.setShadow(!1);var a=mxUtils.getValue(this.state.style,"grIcon",""),n=mxStencilRegistry.getStencil(a);if(null!=n){var h=mxUtils.getValue(this.state.style,"strokeColor","#000000");r=mxUtils.getValue(this.state.style,"grIconSize",r),e.setFillAlpha(this.strokeOpacity/100),e.setFillColor(h),e.setStrokeColor("none"),n.drawShape(e,this,.5*(o-r),0,r,r)}},mxCellRenderer.registerShape(mxShapeAws4GroupCenter.prototype.cst.GROUP_CENTER,mxShapeAws4GroupCenter),mxUtils.extend(mxShapeAws4Group2,mxShape),mxShapeAws4Group2.prototype.cst={GROUP2:"mxgraph.aws4.group2"},mxShapeAws4Group2.prototype.paintVertexShape=function(e,t,s,o,l){e.translate(t,s);var i=25;e.begin(),e.moveTo(0,0),e.lineTo(o,0),e.lineTo(o,l),e.lineTo(0,l),e.close(),e.fillAndStroke(),e.setShadow(!1);var r=mxUtils.getValue(this.state.style,"strokeColor","#000000");e.setFillColor(r),e.begin(),e.moveTo(0,0),e.lineTo(i,0),e.lineTo(i,i),e.lineTo(0,i),e.close(),e.fill();var a=mxUtils.getValue(this.state.style,"grIcon",""),n=mxStencilRegistry.getStencil(a);null!=n&&(i=mxUtils.getValue(this.state.style,"grIconSize",i),e.setFillAlpha(this.strokeOpacity/100),e.setFillColor("#ffffff"),e.setStrokeColor("none"),n.drawShape(e,this,.1*i,.1*i,.8*i,.8*i))},mxCellRenderer.registerShape(mxShapeAws4Group2.prototype.cst.GROUP2,mxShapeAws4Group2);