UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 25.9 kB
function mxFloorplanWall(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanWallCorner(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanWallU(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanRoom(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanWindow(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanDimension(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanDimensionBottom(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanStairs(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanStairsRest(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanDoorLeft(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanDoorRight(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanDoorDouble(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanDoorUneven(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.3}function mxFloorplanDoorOpposing(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.3}function mxFloorplanDoorRevolving(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}function mxFloorplanDoorPocket(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanDoorDoublePocket(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanDoorBypass(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanDoorBifold(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanDoorSlidingGlass(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanOverhead(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanOpening(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanWindowGlider(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanWindowGarden(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.windowPanes=3}function mxFloorplanWindowBow(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.windowPanes=3}function mxFloorplanWindowBay(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.windowPanes=3}function mxFloorplanDoorAccordion(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1,this.dx=.5}function mxFloorplanDoorDoubleAction(o,t,e,l){mxShape.call(this),this.bounds=o,this.fill=t,this.stroke=e,this.strokewidth=null!=l?l:1}mxUtils.extend(mxFloorplanWall,mxShape),mxFloorplanWall.prototype.cst={WALL:"mxgraph.floorplan.wall",WALL_THICKNESS:"wallThickness"},mxFloorplanWall.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}],mxFloorplanWall.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanWall.prototype.background=function(o,t,e,l,r){var n=parseFloat(mxUtils.getValue(this.style,mxFloorplanWall.prototype.cst.WALL_THICKNESS,"10"));o.rect(0,.5*r-.5*n,l,n),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanWall.prototype.cst.WALL,mxFloorplanWall),mxUtils.extend(mxFloorplanWallCorner,mxShape),mxFloorplanWallCorner.prototype.cst={WALL_CORNER:"mxgraph.floorplan.wallCorner",WALL_THICKNESS:"wallThickness"},mxFloorplanWallCorner.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}],mxFloorplanWallCorner.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanWallCorner.prototype.background=function(o,t,e,l,r){var n=parseFloat(mxUtils.getValue(this.style,mxFloorplanWallCorner.prototype.cst.WALL_THICKNESS,"10"));o.begin(),o.moveTo(0,r),o.lineTo(0,0),o.lineTo(l,0),o.lineTo(l,n),o.lineTo(n,n),o.lineTo(n,r),o.close(),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanWallCorner.prototype.cst.WALL_CORNER,mxFloorplanWallCorner),mxUtils.extend(mxFloorplanWallU,mxShape),mxFloorplanWallU.prototype.cst={WALL_U:"mxgraph.floorplan.wallU",WALL_THICKNESS:"wallThickness"},mxFloorplanWallU.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}],mxFloorplanWallU.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanWallU.prototype.background=function(o,t,e,l,r){var n=parseFloat(mxUtils.getValue(this.style,mxFloorplanWallU.prototype.cst.WALL_THICKNESS,"10"));o.begin(),o.moveTo(0,r),o.lineTo(0,0),o.lineTo(l,0),o.lineTo(l,r),o.lineTo(l-n,r),o.lineTo(l-n,n),o.lineTo(n,n),o.lineTo(n,r),o.close(),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanWallU.prototype.cst.WALL_U,mxFloorplanWallU),mxUtils.extend(mxFloorplanRoom,mxShape),mxFloorplanRoom.prototype.cst={ROOM:"mxgraph.floorplan.room",WALL_THICKNESS:"wallThickness"},mxFloorplanRoom.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}],mxFloorplanRoom.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanRoom.prototype.background=function(o,t,e,l,r){var n=parseFloat(mxUtils.getValue(this.style,mxFloorplanRoom.prototype.cst.WALL_THICKNESS,"10"));o.begin(),o.moveTo(0,r),o.lineTo(0,0),o.lineTo(l,0),o.lineTo(l,r),o.close(),o.moveTo(n,n),o.lineTo(n,r-n),o.lineTo(l-n,r-n),o.lineTo(l-n,n),o.close(),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanRoom.prototype.cst.ROOM,mxFloorplanRoom),mxUtils.extend(mxFloorplanWindow,mxShape),mxFloorplanWindow.prototype.cst={WINDOW:"mxgraph.floorplan.window",WALL_THICKNESS:"wallThickness"},mxFloorplanWindow.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}],mxFloorplanWindow.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanWindow.prototype.background=function(o,t,e,l,r){var n=parseFloat(mxUtils.getValue(this.style,mxFloorplanWindow.prototype.cst.WALL_THICKNESS,"10"));o.rect(0,.5*r-.5*n,l,n),o.fillAndStroke(),o.begin(),o.moveTo(0,.5*r),o.lineTo(l,.5*r),o.stroke()},mxCellRenderer.registerShape(mxFloorplanWindow.prototype.cst.WINDOW,mxFloorplanWindow),mxUtils.extend(mxFloorplanDimension,mxShape),mxFloorplanDimension.prototype.cst={DIMENSION:"mxgraph.floorplan.dimension"},mxFloorplanDimension.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}],mxFloorplanDimension.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDimension.prototype.background=function(o,t,e,l,r){o.begin(),o.moveTo(0,20),o.lineTo(l,20),o.moveTo(10,15),o.lineTo(0,20),o.lineTo(10,25),o.moveTo(l-10,15),o.lineTo(l,20),o.lineTo(l-10,25),o.moveTo(0,15),o.lineTo(0,r),o.moveTo(l,15),o.lineTo(l,r),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDimension.prototype.cst.DIMENSION,mxFloorplanDimension),mxUtils.extend(mxFloorplanDimensionBottom,mxShape),mxFloorplanDimensionBottom.prototype.cst={DIMENSION:"mxgraph.floorplan.dimensionBottom"},mxFloorplanDimensionBottom.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDimensionBottom.prototype.background=function(o,t,e,l,r){o.begin(),o.moveTo(0,r-20),o.lineTo(l,r-20),o.moveTo(10,r-15),o.lineTo(0,r-20),o.lineTo(10,r-25),o.moveTo(l-10,r-15),o.lineTo(l,r-20),o.lineTo(l-10,r-25),o.moveTo(0,r-15),o.lineTo(0,0),o.moveTo(l,r-15),o.lineTo(l,0),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDimensionBottom.prototype.cst.DIMENSION,mxFloorplanDimensionBottom),mxUtils.extend(mxFloorplanStairs,mxShape),mxFloorplanStairs.prototype.cst={STAIRS:"mxgraph.floorplan.stairs"},mxFloorplanStairs.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e);var n=Math.max(l,50);this.background(o,t,e,n,r)},mxFloorplanStairs.prototype.background=function(o,t,e,l,r){o.rect(0,0,l,r),o.fillAndStroke(),o.setShadow(!1),o.begin();for(var n=25;n<l;n+=25)o.moveTo(n,0),o.lineTo(n,r);o.stroke(),o.begin(),o.moveTo(0,.5*r),o.lineTo(l,.5*r),o.moveTo(l-25,0),o.lineTo(l,.5*r),o.lineTo(l-25,r),o.stroke()},mxCellRenderer.registerShape(mxFloorplanStairs.prototype.cst.STAIRS,mxFloorplanStairs),mxUtils.extend(mxFloorplanStairsRest,mxShape),mxFloorplanStairsRest.prototype.cst={STAIRS:"mxgraph.floorplan.stairsRest"},mxFloorplanStairsRest.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e);var n=Math.max(l,50,r);Math.min(l,r),this.background(o,t,e,n,r)},mxFloorplanStairsRest.prototype.background=function(o,t,e,l,r){o.rect(0,0,l,r),o.fillAndStroke(),o.setShadow(!1),o.begin();for(var n=25;n<l-.5*r;n+=25)o.moveTo(n,0),o.lineTo(n,r);o.stroke(),o.begin(),o.moveTo(0,.5*r),o.lineTo(l,.5*r),o.moveTo(l,0),o.lineTo(l-.5*r,.5*r),o.lineTo(l,r),o.moveTo(l-.5*r,0),o.lineTo(l-.5*r,r),o.moveTo(0,.5*r),o.lineTo(l,.5*r),o.stroke()},mxCellRenderer.registerShape(mxFloorplanStairsRest.prototype.cst.STAIRS,mxFloorplanStairsRest),mxUtils.extend(mxFloorplanDoorLeft,mxShape),mxFloorplanDoorLeft.prototype.cst={DOOR_LEFT:"mxgraph.floorplan.doorLeft"},mxFloorplanDoorLeft.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDoorLeft.prototype.background=function(o,t,e,l,r){o.rect(0,0,l,5),o.fillAndStroke(),o.begin(),o.moveTo(l,5),o.arcTo(l,l,0,0,1,0,5+l),o.lineTo(0,5),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorLeft.prototype.cst.DOOR_LEFT,mxFloorplanDoorLeft),mxUtils.extend(mxFloorplanDoorRight,mxShape),mxFloorplanDoorRight.prototype.cst={DOOR_RIGHT:"mxgraph.floorplan.doorRight"},mxFloorplanDoorRight.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDoorRight.prototype.background=function(o,t,e,l,r){o.rect(0,0,l,5),o.fillAndStroke(),o.begin(),o.moveTo(0,5),o.arcTo(l,l,0,0,0,l,5+l),o.lineTo(l,5),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorRight.prototype.cst.DOOR_RIGHT,mxFloorplanDoorRight),mxUtils.extend(mxFloorplanDoorDouble,mxShape),mxFloorplanDoorDouble.prototype.cst={DOOR_DOUBLE:"mxgraph.floorplan.doorDouble"},mxFloorplanDoorDouble.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDoorDouble.prototype.background=function(o,t,e,l,r){var n=.5*l;o.rect(0,0,l,5),o.fillAndStroke(),o.begin(),o.moveTo(n,0),o.lineTo(n,5),o.moveTo(n,5),o.arcTo(n,n,0,0,1,0,5+n),o.lineTo(0,5),o.moveTo(n,5),o.arcTo(n,n,0,0,0,l,5+n),o.lineTo(l,5),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorDouble.prototype.cst.DOOR_DOUBLE,mxFloorplanDoorDouble),mxUtils.extend(mxFloorplanDoorUneven,mxShape),mxFloorplanDoorUneven.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorUneven.prototype.cst={DOOR_UNEVEN:"mxgraph.floorplan.doorUneven"},mxFloorplanDoorUneven.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDoorUneven.prototype.background=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));o.rect(0,0,l,5),o.fillAndStroke(),o.begin(),o.moveTo(n,0),o.lineTo(n,5),o.arcTo(n,n,0,0,1,0,5+n),o.lineTo(0,5),o.moveTo(n,5),o.arcTo(l-n,l-n,0,0,0,l,5+l-n),o.lineTo(l,5),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorUneven.prototype.cst.DOOR_UNEVEN,mxFloorplanDoorUneven),Graph.handleFactory[mxFloorplanDoorUneven.prototype.cst.DOOR_UNEVEN]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanDoorOpposing,mxShape),mxFloorplanDoorOpposing.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorOpposing.prototype.cst={DOOR_OPPOSING:"mxgraph.floorplan.doorOpposing"},mxFloorplanDoorOpposing.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDoorOpposing.prototype.background=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));o.rect(0,n,l,5),o.fillAndStroke(),o.begin(),o.moveTo(n,n),o.lineTo(n,n+5),o.arcTo(n,n,0,0,0,0,0),o.lineTo(0,n),o.moveTo(n,n+5),o.arcTo(l-n,l-n,0,0,0,l,5+l),o.lineTo(l,n+5),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorOpposing.prototype.cst.DOOR_OPPOSING,mxFloorplanDoorOpposing),Graph.handleFactory[mxFloorplanDoorOpposing.prototype.cst.DOOR_OPPOSING]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanDoorRevolving,mxShape),mxFloorplanDoorRevolving.prototype.cst={DOOR_REVOLVING:"mxgraph.floorplan.doorRevolving"},mxFloorplanDoorRevolving.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDoorRevolving.prototype.background=function(o,t,e,l,r){var n=Math.min(l,r);o.rect(.5*(l-n),.5*r-2.5,n,5),o.fillAndStroke(),o.rect(.5*l-2.5,.5*(r-n),5,n),o.fillAndStroke(),o.begin(),o.ellipse(.5*(l-n),.5*(r-n),n,n),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorRevolving.prototype.cst.DOOR_REVOLVING,mxFloorplanDoorRevolving),mxUtils.extend(mxFloorplanDoorPocket,mxShape),mxFloorplanDoorPocket.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorPocket.prototype.cst={DOOR_POCKET:"mxgraph.floorplan.doorPocket"},mxFloorplanDoorPocket.prototype.paintVertexShape=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));o.translate(t,e),o.rect(n,.5*r-5,5,10),o.fillAndStroke(),o.rect(l-5,.5*r-5,5,10),o.fillAndStroke(),o.rect(0,.5*r-2.5,l-n,5),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanDoorPocket.prototype.cst.DOOR_POCKET,mxFloorplanDoorPocket),Graph.handleFactory[mxFloorplanDoorPocket.prototype.cst.DOOR_POCKET]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanDoorDoublePocket,mxShape),mxFloorplanDoorDoublePocket.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorDoublePocket.prototype.cst={DOOR_DOUBLE_POCKET:"mxgraph.floorplan.doorDoublePocket"},mxFloorplanDoorDoublePocket.prototype.paintVertexShape=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));o.translate(t,e),o.rect(n,.5*r-5,5,10),o.fillAndStroke(),o.rect(l-n-5,.5*r-5,5,10),o.fillAndStroke(),o.rect(0,.5*r-2.5,.5*l-n,5),o.fillAndStroke(),o.rect(.5*l+n,.5*r-2.5,.5*l-n,5),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanDoorDoublePocket.prototype.cst.DOOR_DOUBLE_POCKET,mxFloorplanDoorDoublePocket),Graph.handleFactory[mxFloorplanDoorDoublePocket.prototype.cst.DOOR_DOUBLE_POCKET]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(.25,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.25,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanDoorBypass,mxShape),mxFloorplanDoorBypass.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorBypass.prototype.cst={DOOR_BYPASS:"mxgraph.floorplan.doorBypass"},mxFloorplanDoorBypass.prototype.paintVertexShape=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));o.translate(t,e),o.rect(0,.5*r-5,5,10),o.fillAndStroke(),o.rect(l-5,.5*r-5,5,10),o.fillAndStroke(),o.rect(0,.5*r,.5*l,5),o.fillAndStroke(),o.rect(n,.5*r-5,.5*l,5),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanDoorBypass.prototype.cst.DOOR_BYPASS,mxFloorplanDoorBypass),Graph.handleFactory[mxFloorplanDoorBypass.prototype.cst.DOOR_BYPASS]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanDoorBifold,mxShape),mxFloorplanDoorBifold.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorBifold.prototype.cst={DOOR_BIFOLD:"mxgraph.floorplan.doorBifold"},mxFloorplanDoorBifold.prototype.paintVertexShape=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),a=parseFloat(mxUtils.getValue(this.style,"strokeWidth",this.dx));o.translate(t,e),o.rect(0,r-10,5,10),o.fillAndStroke(),o.rect(l-5,r-10,5,10),o.fillAndStroke(),o.setStrokeWidth(3*a),o.begin(),o.moveTo(5,r-10),o.lineTo(Math.max(.5*(n-10)+5,5),0),o.lineTo(Math.max(n,5),r-10),o.moveTo(l-5,r-10),o.lineTo(l-Math.max(.5*(n-10)+5,5),0),o.lineTo(l-Math.max(n,5),r-10),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorBifold.prototype.cst.DOOR_BIFOLD,mxFloorplanDoorBifold),Graph.handleFactory[mxFloorplanDoorBifold.prototype.cst.DOOR_BIFOLD]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanDoorSlidingGlass,mxShape),mxFloorplanDoorSlidingGlass.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorSlidingGlass.prototype.cst={DOOR_SLIDING_GLASS:"mxgraph.floorplan.doorSlidingGlass"},mxFloorplanDoorSlidingGlass.prototype.paintVertexShape=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));o.translate(t,e),o.rect(0,.5*r-5,5,10),o.fillAndStroke(),o.rect(l-5,.5*r-5,5,10),o.fillAndStroke(),o.rect(0,.5*r,.5*l,2),o.fillAndStroke(),o.rect(n,.5*r-2,.5*l,2),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanDoorSlidingGlass.prototype.cst.DOOR_SLIDING_GLASS,mxFloorplanDoorSlidingGlass),Graph.handleFactory[mxFloorplanDoorSlidingGlass.prototype.cst.DOOR_SLIDING_GLASS]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanOverhead,mxShape),mxFloorplanOverhead.prototype.cst={DOOR_OVERHEAD:"mxgraph.floorplan.doorOverhead"},mxFloorplanOverhead.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),o.rect(0,r-10,5,10),o.fillAndStroke(),o.rect(l-5,r-10,5,10),o.fillAndStroke(),o.rect(5,0,l-10,r-5),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanOverhead.prototype.cst.DOOR_OVERHEAD,mxFloorplanOverhead),mxUtils.extend(mxFloorplanOpening,mxShape),mxFloorplanOpening.prototype.cst={OPENING:"mxgraph.floorplan.opening"},mxFloorplanOpening.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),o.rect(0,0,5,r),o.fillAndStroke(),o.rect(l-5,0,5,r),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanOpening.prototype.cst.OPENING,mxFloorplanOpening),mxUtils.extend(mxFloorplanWindowGlider,mxShape),mxFloorplanWindowGlider.prototype.customProperties=[{name:"dx",dispName:"Window size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanWindowGlider.prototype.cst={WINDOW_GLIDER:"mxgraph.floorplan.windowGlider"},mxFloorplanWindowGlider.prototype.paintVertexShape=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));o.translate(t,e),o.rect(0,.5*r-5,l,10),o.fillAndStroke(),o.rect(0,.5*r,.5*l,1),o.fillAndStroke(),o.rect(n,.5*r-1,.5*l,1),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanWindowGlider.prototype.cst.WINDOW_GLIDER,mxFloorplanWindowGlider),Graph.handleFactory[mxFloorplanWindowGlider.prototype.cst.WINDOW_GLIDER]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(.5,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanWindowGarden,mxShape),mxFloorplanWindowGarden.prototype.customProperties=[{name:"windowPanes",dispName:"Panes",type:"int",min:0,max:20,defVal:3}],mxFloorplanWindowGarden.prototype.cst={WINDOW_GARDEN:"mxgraph.floorplan.windowGarden"},mxFloorplanWindowGarden.prototype.paintVertexShape=function(o,t,e,l,r){var n=Math.min(mxUtils.getValue(this.style,"windowPanes",this.windowPanes),20),a=(l-14-2*(n-1))/n;o.translate(t,e),o.rect(0,r-10,5,10),o.fillAndStroke(),o.rect(l-5,r-10,5,10),o.fillAndStroke(),o.begin(),o.moveTo(5,r),o.lineTo(5,0),o.lineTo(l-5,0),o.lineTo(l-5,r),o.lineTo(l-5-2,r),o.lineTo(l-5-2,2);for(var i=1;i<n;i++)o.lineTo(l-5-2-i*a-2*(i-1),2),o.lineTo(l-5-2-i*a-2*(i-1),r),o.lineTo(l-5-4-2*(i-1)-i*a,r),o.lineTo(l-5-4-2*(i-1)-i*a,2);o.lineTo(7,2),o.lineTo(7,r),o.close(),o.fillAndStroke()},mxCellRenderer.registerShape(mxFloorplanWindowGarden.prototype.cst.WINDOW_GARDEN,mxFloorplanWindowGarden),mxUtils.extend(mxFloorplanWindowBow,mxShape),mxFloorplanWindowBow.prototype.cst={WINDOW_BOW:"mxgraph.floorplan.windowBow"},mxFloorplanWindowBow.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e);var n=Math.min(.5*l,r);o.begin(),o.moveTo(0,.5*(r-n)),o.lineTo(n,.5*(r+n)),o.lineTo(l-n,.5*(r+n)),o.lineTo(l,.5*(r-n)),o.stroke()},mxCellRenderer.registerShape(mxFloorplanWindowBow.prototype.cst.WINDOW_BOW,mxFloorplanWindowBow),mxUtils.extend(mxFloorplanWindowBay,mxShape),mxFloorplanWindowBay.prototype.cst={WINDOW_BAY:"mxgraph.floorplan.windowBay"},mxFloorplanWindowBay.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),Math.min(.5*l,r),o.begin(),o.moveTo(0,0),o.lineTo(.15*l,.6*r),o.lineTo(.35*l,r),o.lineTo(.65*l,r),o.lineTo(.85*l,.6*r),o.lineTo(l,0),o.stroke()},mxCellRenderer.registerShape(mxFloorplanWindowBay.prototype.cst.WINDOW_BAY,mxFloorplanWindowBay),mxUtils.extend(mxFloorplanDoorAccordion,mxShape),mxFloorplanDoorAccordion.prototype.customProperties=[{name:"dx",dispName:"Door size",type:"float",min:0,max:1,defVal:.3}],mxFloorplanDoorAccordion.prototype.cst={DOOR_ACCORDION:"mxgraph.floorplan.doorAccordion"},mxFloorplanDoorAccordion.prototype.paintVertexShape=function(o,t,e,l,r){var n=l*Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),a=(n=Math.max(5,n),n=Math.min(l-5,n),parseFloat(mxUtils.getValue(this.style,"strokeWidth",this.dx)));o.translate(t,e),o.rect(0,.5*r-5,5,10),o.fillAndStroke(),o.rect(l-5,.5*r-5,5,10),o.fillAndStroke(),o.setStrokeWidth(3*a);var i=n-5;o.begin(),o.moveTo(5,.5*r),o.lineTo(5+.1*i,0),o.lineTo(5+.3*i,r),o.lineTo(5+.5*i,0),o.lineTo(5+.7*i,r),o.lineTo(5+.9*i,0),o.lineTo(5+i,.5*r),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorAccordion.prototype.cst.DOOR_ACCORDION,mxFloorplanDoorAccordion),Graph.handleFactory[mxFloorplanDoorAccordion.prototype.cst.DOOR_ACCORDION]=function(o){return[Graph.createHandle(o,["dx"],(function(o){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"dx",this.dx))));return new mxPoint(o.x+t*o.width,o.y+5)}),(function(o,t){this.state.style.dx=Math.round(100*Math.max(0,Math.min(1,(t.x-o.x)/o.width)))/100}))]},mxUtils.extend(mxFloorplanDoorDoubleAction,mxShape),mxFloorplanDoorDoubleAction.prototype.cst={DOOR_DOUBLE_ACTION:"mxgraph.floorplan.doorDoubleAction"},mxFloorplanDoorDoubleAction.prototype.paintVertexShape=function(o,t,e,l,r){o.translate(t,e),this.background(o,t,e,l,r)},mxFloorplanDoorDoubleAction.prototype.background=function(o,t,e,l,r){o.rect(0,.5*r-2.5,l,5),o.fillAndStroke(),o.begin(),o.moveTo(l,.5*r+2.5),o.arcTo(l,l,0,0,1,0,.5*r+2.5+l),o.lineTo(0,.5*r+2.5),o.stroke(),o.setDashed(!0),o.begin(),o.moveTo(l,.5*r-2.5),o.arcTo(l,l,0,0,0,0,.5*r-2.5-l),o.lineTo(0,.5*r-2.5),o.stroke()},mxCellRenderer.registerShape(mxFloorplanDoorDoubleAction.prototype.cst.DOOR_DOUBLE_ACTION,mxFloorplanDoorDoubleAction);