UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 2.26 kB
function mxShapeKubernetesIcon(e,a,s,t){mxShape.call(this),this.bounds=e,this.fill=a,this.stroke=s,this.strokewidth=null!=t?t:1}mxUtils.extend(mxShapeKubernetesIcon,mxShape),mxShapeKubernetesIcon.prototype.cst={ICON:"mxgraph.kubernetes.icon"},mxShapeKubernetesIcon.prototype.customProperties=[{name:"prIcon",dispName:"",defVal:"api",type:"API",enumList:[{val:"c_c_m",dispName:"C-C-M"},{val:"c_m",dispName:"C-M"},{val:"c_role",dispName:"C-Role"},{val:"cm",dispName:"CM"},{val:"crb",dispName:"CRB"},{val:"crd",dispName:"CRD"},{val:"cronjob",dispName:"Cronjob"},{val:"deploy",dispName:"Deploy"},{val:"ds",dispName:"DS"},{val:"ep",dispName:"EP"},{val:"etcd",dispName:"ETCD"},{val:"group",dispName:"Group"},{val:"hpa",dispName:"HPA"},{val:"ing",dispName:"ING"},{val:"job",dispName:"Job"},{val:"k_proxy",dispName:"K-Proxy"},{val:"kubelet",dispName:"Kubelet"},{val:"limits",dispName:"Limits"},{val:"master",dispName:"Master"},{val:"netpol",dispName:"Netpol"},{val:"node",dispName:"Node"},{val:"ns",dispName:"NS"},{val:"pod",dispName:"Pod"},{val:"psp",dispName:"PSP"},{val:"pv",dispName:"PV"},{val:"pvc",dispName:"PVC"},{val:"quota",dispName:"Quota"},{val:"rb",dispName:"RB"},{val:"role",dispName:"Role"},{val:"rs",dispName:"RS"},{val:"sa",dispName:"SA"},{val:"sc",dispName:"SC"},{val:"sched",dispName:"Sched"},{val:"secret",dispName:"Secret"},{val:"sts",dispName:"STS"},{val:"svc",dispName:"SVC"},{val:"user",dispName:"User"},{val:"vol",dispName:"Vol"}]}],mxShapeKubernetesIcon.prototype.paintVertexShape=function(e,a,s,t,l){var p=mxUtils.getValue(this.state.style,"prIcon",""),i=mxUtils.getValue(this.state.style,"fillColor","#ffffff"),m=mxUtils.getValue(this.state.style,"strokeColor","#ffffff");e.translate(a,s);var o=mxStencilRegistry.getStencil("mxgraph.kubernetes.frame");e.setFillColor(m),o.drawShape(e,this,0,0,t,l),e.setFillColor(i),o.drawShape(e,this,.03*t,.03*l,.94*t,.94*l);var r=mxStencilRegistry.getStencil("mxgraph.kubernetes."+p);null!=r&&(e.setFillColor(m),r.drawShape(e,this,.2*t,.2*l,.6*t,.6*l))},mxCellRenderer.registerShape(mxShapeKubernetesIcon.prototype.cst.ICON,mxShapeKubernetesIcon),mxShapeKubernetesIcon.prototype.getConstraints=function(e,a,s){var t=[];return Math.min(.5*s,.5*a),t.push(new mxConnectionConstraint(new mxPoint(0,.5),!1)),t};