@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 3.37 kB
JavaScript
function mxCabinetsCabinet(e,t,o,n){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=n?n:1}function mxCabinetsCoverPlate(e,t,o,n){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=n?n:1}function mxCabinetsDimension(e,t,o,n){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=n?n:1}function mxCabinetsDimensionBottom(e,t,o,n){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=o,this.strokewidth=null!=n?n:1}mxUtils.extend(mxCabinetsCabinet,mxShape),mxCabinetsCabinet.prototype.cst={HAS_STAND:"hasStand",CABINET:"mxgraph.cabinets.cabinet"},mxCabinetsCabinet.prototype.customProperties=[{name:"hasStand",dispName:"Has Stand",type:"bool",defVal:!0}],mxCabinetsCabinet.prototype.paintVertexShape=function(e,t,o,n,i){e.translate(t,o),this.background(e,0,0,n,i),e.setShadow(!1),this.foreground(e,0,0,n,i)},mxCabinetsCabinet.prototype.background=function(e,t,o,n,i){e.rect(0,0,n,i),e.fillAndStroke()},mxCabinetsCabinet.prototype.foreground=function(e,t,o,n,i){var s=15;e.rect(0,0,n,s),e.stroke(),e.begin(),e.moveTo(s,s),e.lineTo(s,i),e.moveTo(n-s,s),e.lineTo(n-s,i),e.stroke(),1===mxUtils.getValue(this.style,mxCabinetsCabinet.prototype.cst.HAS_STAND,"1")?(e.rect(0,i-40,n,40),e.fillAndStroke()):(e.rect(0,i-s,n,s),e.fillAndStroke())},mxCellRenderer.registerShape(mxCabinetsCabinet.prototype.cst.CABINET,mxCabinetsCabinet),mxUtils.extend(mxCabinetsCoverPlate,mxShape),mxCabinetsCoverPlate.prototype.cst={COVER_PLATE:"mxgraph.cabinets.coverPlate"},mxCabinetsCoverPlate.prototype.paintVertexShape=function(e,t,o,n,i){e.translate(t,o),this.background(e,0,0,n,i),e.setShadow(!1),this.foreground(e,0,0,n,i)},mxCabinetsCoverPlate.prototype.background=function(e,t,o,n,i){e.begin(),e.moveTo(0,0),e.lineTo(n,0),e.lineTo(n,i),e.lineTo(0,i),e.close(),e.moveTo(10,.5*i-12.5),e.lineTo(10,.5*i+12.5),e.lineTo(n-10,.5*i+12.5),e.lineTo(n-10,.5*i-12.5),e.close(),e.fillAndStroke()},mxCabinetsCoverPlate.prototype.foreground=function(e,t,o,n,i){},mxCellRenderer.registerShape(mxCabinetsCoverPlate.prototype.cst.COVER_PLATE,mxCabinetsCoverPlate),mxUtils.extend(mxCabinetsDimension,mxShape),mxCabinetsDimension.prototype.cst={DIMENSION:"mxgraph.cabinets.dimension"},mxCabinetsDimension.prototype.paintVertexShape=function(e,t,o,n,i){e.translate(t,o),this.background(e,t,o,n,i)},mxCabinetsDimension.prototype.background=function(e,t,o,n,i){e.begin(),e.moveTo(0,20),e.lineTo(n,20),e.moveTo(10,15),e.lineTo(0,20),e.lineTo(10,25),e.moveTo(n-10,15),e.lineTo(n,20),e.lineTo(n-10,25),e.moveTo(0,15),e.lineTo(0,i),e.moveTo(n,15),e.lineTo(n,i),e.stroke()},mxCellRenderer.registerShape(mxCabinetsDimension.prototype.cst.DIMENSION,mxCabinetsDimension),mxUtils.extend(mxCabinetsDimensionBottom,mxShape),mxCabinetsDimensionBottom.prototype.cst={DIMENSION:"mxgraph.cabinets.dimensionBottom"},mxCabinetsDimensionBottom.prototype.paintVertexShape=function(e,t,o,n,i){e.translate(t,o),this.background(e,t,o,n,i)},mxCabinetsDimensionBottom.prototype.background=function(e,t,o,n,i){e.begin(),e.moveTo(0,i-20),e.lineTo(n,i-20),e.moveTo(10,i-15),e.lineTo(0,i-20),e.lineTo(10,i-25),e.moveTo(n-10,i-15),e.lineTo(n,i-20),e.lineTo(n-10,i-25),e.moveTo(0,i-15),e.lineTo(0,0),e.moveTo(n,i-15),e.lineTo(n,0),e.stroke()},mxCellRenderer.registerShape(mxCabinetsDimensionBottom.prototype.cst.DIMENSION,mxCabinetsDimensionBottom);