@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 19.2 kB
JavaScript
Sidebar.prototype.addFloorplanPalette=function(){var e=100,t=100,r=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;html=1;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;align=center;shape=mxgraph.floorplan.",l=(mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.STYLE_VERTICAL_ALIGN,"mxgraph.floorplan"),n="floorplan ";this.setCurrentSearchEntryLibrary("floorplan");var o=[this.createVertexTemplateEntry(r+"wall;fillColor=#000000;",e,10,"","Wall (Horizontal)",null,null,this.getTagsForStencil(l,"wall",n).join(" ")),this.createVertexTemplateEntry(r+"wall;fillColor=#000000;direction=south;",10,t,"","Wall (Vertical)",null,null,this.getTagsForStencil(l,"wall",n).join(" ")),this.createVertexTemplateEntry(r+"wallCorner;fillColor=#000000;",e,t,"","Wall (Corner NW)",null,null,this.getTagsForStencil(l,"wallCorner",n).join(" ")),this.createVertexTemplateEntry(r+"wallCorner;fillColor=#000000;direction=south;",e,t,"","Wall (Corner NE)",null,null,this.getTagsForStencil(l,"wallCorner",n).join(" ")),this.createVertexTemplateEntry(r+"wallCorner;fillColor=#000000;direction=west",e,t,"","Wall (Corner SE)",null,null,this.getTagsForStencil(l,"wallCorner",n).join(" ")),this.createVertexTemplateEntry(r+"wallCorner;fillColor=#000000;direction=north",e,t,"","Wall (Corner SW)",null,null,this.getTagsForStencil(l,"wallCorner",n).join(" ")),this.createVertexTemplateEntry(r+"wallU;fillColor=#000000;",e,t,"","Wall (U)",null,null,this.getTagsForStencil(l,"wallU",n).join(" ")),this.createVertexTemplateEntry(r+"room;fillColor=#000000;",e,t,"","Room",null,null,this.getTagsForStencil(l,"room",n).join(" ")),this.createVertexTemplateEntry("shape=dimension;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=bottom;spacingBottom=-5;labelBackgroundColor=#ffffff",100,40,"Label","Horizontal Dimension",null,null,"horizontal dimension measure distance unit"),this.createVertexTemplateEntry("shape=dimension;direction=west;whiteSpace=wrap;html=1;align=center;points=[];verticalAlign=top;spacingTop=-8;labelBackgroundColor=#ffffff",100,40,"Label","Vertical Dimension",null,null,"vertical dimension measure distance unit"),this.createVertexTemplateEntry("shape=dimension;direction=north;whiteSpace=wrap;html=1;align=right;points=[];verticalAlign=middle;labelBackgroundColor=#ffffff",40,100,"Label","Vertical Dimension",null,null,"vertical dimension measure distance unit"),this.createVertexTemplateEntry("shape=dimension;direction=south;whiteSpace=wrap;html=1;align=left;points=[];verticalAlign=middle;labelBackgroundColor=#ffffff",40,100,"Label","Horizontal Dimension",null,null,"horizontal dimension measure distance unit"),this.createVertexTemplateEntry(r+"window;",e,10,"","Window",null,null,this.getTagsForStencil(l,"window",n).join(" ")),this.createVertexTemplateEntry(r+"windowGlider;dx=0.25;",100,10,"","Window, Glider",null,null,this.getTagsForStencil(l,"windowGlider",n).join(" ")),this.createVertexTemplateEntry(r+"windowGarden;dx=0.25;",100,20,"","Window, Garden",null,null,this.getTagsForStencil(l,"windowGarden",n).join(" ")),this.createVertexTemplateEntry(r+"windowBow;strokeWidth=3;",100,20,"","Window, Bow",null,null,this.getTagsForStencil(l,"windowBow",n).join(" ")),this.createVertexTemplateEntry(r+"windowBay;strokeWidth=3;aspect=fixed;",100,40,"","Window, Bay",null,null,this.getTagsForStencil(l,"windowBay",n).join(" ")),this.createVertexTemplateEntry(r+"stairs;",300,100,"","Stairs",null,null,this.getTagsForStencil(l,"stairs",n).join(" ")),this.createVertexTemplateEntry(r+"stairs;direction=south;",100,300,"","Stairs",null,null,this.getTagsForStencil(l,"stairs",n).join(" ")),this.createVertexTemplateEntry(r+"stairsRest;",300,200,"","Stairs",null,null,this.getTagsForStencil(l,"stairsRest",n).join(" ")),this.createVertexTemplateEntry(r+"doorLeft;aspect=fixed;",80,85,"","Door",null,null,this.getTagsForStencil(l,"doorLeft",n).join(" ")),this.createVertexTemplateEntry(r+"doorRight;aspect=fixed;",80,85,"","Door",null,null,this.getTagsForStencil(l,"doorRight",n).join(" ")),this.createVertexTemplateEntry(r+"doorDouble;aspect=fixed;",160,85,"","Door, Double",null,null,this.getTagsForStencil(l,"doorDouble",n).join(" ")),this.createVertexTemplateEntry(r+"doorUneven;dx=0.5;",160,85,"","Door, Uneven",null,null,this.getTagsForStencil(l,"doorUneven",n).join(" ")),this.createVertexTemplateEntry(r+"doorOpposing;dx=0.5;",160,165,"","Door, Opposing",null,null,this.getTagsForStencil(l,"doorOpposing",n).join(" ")),this.createVertexTemplateEntry(r+"doorRevolving;aspect=fixed;",80,85,"","Door, Revolving",null,null,this.getTagsForStencil(l,"doorLeft",n).join(" ")),this.createVertexTemplateEntry(r+"doorPocket;dx=0.5;",104,10,"","Door, Pocket",null,null,this.getTagsForStencil(l,"doorPocket",n).join(" ")),this.createVertexTemplateEntry(r+"doorDoublePocket;dx=0.25;",104,10,"","Door, Double Pocket",null,null,this.getTagsForStencil(l,"doorDoublePocket",n).join(" ")),this.createVertexTemplateEntry(r+"doorBypass;dx=0.25;",104,10,"","Door, By-pass",null,null,this.getTagsForStencil(l,"doorBypass",n).join(" ")),this.createVertexTemplateEntry(r+"doorBifold;dx=0.3;",160,40,"","Door, Bi-fold",null,null,this.getTagsForStencil(l,"doorBifold",n).join(" ")),this.createVertexTemplateEntry(r+"doorSlidingGlass;dx=0.25;",104,10,"","Door, SlidingGlass",null,null,this.getTagsForStencil(l,"doorSlidingGlass",n).join(" ")),this.createVertexTemplateEntry(r+"doorOverhead;",104,30,"","Door, Overhead",null,null,this.getTagsForStencil(l,"doorOverhead",n).join(" ")),this.createVertexTemplateEntry(r+"doorAccordion;dx=0.6;",160,30,"","Door, Accordion",null,null,this.getTagsForStencil(l,"accordion",n).join(" ")),this.createVertexTemplateEntry(r+"doorDoubleAction;aspect=fixed;",80,165,"","Door, Double Action",null,null,this.getTagsForStencil(l,"doorDoubleAction",n).join(" ")),this.createVertexTemplateEntry(r+"opening;",50,10,"","Opening",null,null,this.getTagsForStencil(l,"opening",n).join(" ")),this.createVertexTemplateEntry(r+"bathtub;",180,60,"","Bathtub",null,null,this.getTagsForStencil(l,"bathtub",n).join(" ")),this.createVertexTemplateEntry(r+"bed_double;",200,180,"","Bed, Double",null,null,this.getTagsForStencil(l,"bed_double",n).join(" ")),this.createVertexTemplateEntry(r+"bed_single;",100,180,"","Bed Single",null,null,this.getTagsForStencil(l,"bed_single",n).join(" ")),this.createVertexTemplateEntry(r+"bookcase;",120,30,"","Bookcase",null,null,this.getTagsForStencil(l,"bookcase",n).join(" ")),this.createVertexTemplateEntry(r+"chair;",41,52,"","Chair",null,null,this.getTagsForStencil(l,"chair",n).join(" ")),this.createVertexTemplateEntry(r+"copier;",110,60,"","Copier",null,null,this.getTagsForStencil(l,"copier",n).join(" ")),this.createVertexTemplateEntry(r+"couch;",150,80,"","Couch",null,null,this.getTagsForStencil(l,"couch",n).join(" ")),this.createVertexTemplateEntry(r+"crt_tv;",60,40,"","CRT TV",null,null,this.getTagsForStencil(l,"crt_tv",n).join(" ")),this.createVertexTemplateEntry(r+"desk_corner;",150,150,"","Desk Corner",null,null,this.getTagsForStencil(l,"desk_corner",n).join(" ")),this.createVertexTemplateEntry(r+"desk_corner_2;",150,120,"","Desk Corner 2",null,null,this.getTagsForStencil(l,"desk_corner_2",n).join(" ")),this.createVertexTemplateEntry(r+"dresser;",100,65,"","Dresser",null,null,this.getTagsForStencil(l,"dresser",n).join(" ")),this.createVertexTemplateEntry(r+"elevator;",100,100,"","Elevator",null,null,this.getTagsForStencil(l,"elevator",n).join(" ")),this.createVertexTemplateEntry(r+"fireplace;",304,200,"","Fireplace",null,null,this.getTagsForStencil(l,"fireplace",n).join(" ")),this.createVertexTemplateEntry(r+"flat_tv;",70,10,"","Flat TV",null,null,this.getTagsForStencil(l,"flat_tv",n).join(" ")),this.createVertexTemplateEntry(r+"floor_lamp;",50,50,"","Floor Lamp",null,null,this.getTagsForStencil(l,"floor_lamp",n).join(" ")),this.createVertexTemplateEntry(r+"laptop;",40,35,"","Laptop",null,null,this.getTagsForStencil(l,"laptop",n).join(" ")),this.createVertexTemplateEntry(r+"office_chair;",40,43,"","Office Chair",null,null,this.getTagsForStencil(l,"office_chair",n).join(" ")),this.createVertexTemplateEntry(r+"piano;",135,143,"","Piano",null,null,this.getTagsForStencil(l,"piano",n).join(" ")),this.createVertexTemplateEntry(r+"plant;",47,51,"","Plant",null,null,this.getTagsForStencil(l,"plant",n).join(" ")),this.createVertexTemplateEntry(r+"printer;",40,47,"","Printer",null,null,this.getTagsForStencil(l,"printer",n).join(" ")),this.createVertexTemplateEntry(r+"range_1;",50,62,"","Range 1",null,null,this.getTagsForStencil(l,"range_1",n).join(" ")),this.createVertexTemplateEntry(r+"range_2;",75,62,"","Range 2",null,null,this.getTagsForStencil(l,"range_2",n).join(" ")),this.createVertexTemplateEntry(r+"refrigerator;",60,62,"","Refrigerator",null,null,this.getTagsForStencil(l,"refrigerator",n).join(" ")),this.createVertexTemplateEntry(r+"shower;",100,100,"","Shower",null,null,this.getTagsForStencil(l,"shower",n).join(" ")),this.createVertexTemplateEntry(r+"sink_1;",40,35,"","Sink 1",null,null,this.getTagsForStencil(l,"sink_1",n).join(" ")),this.createVertexTemplateEntry(r+"sink_2;",40,35,"","Sink 2",null,null,this.getTagsForStencil(l,"sink_2",n).join(" ")),this.createVertexTemplateEntry(r+"sink_double;",80,35,"","Sink Double",null,null,this.getTagsForStencil(l,"sink_double",n).join(" ")),this.createVertexTemplateEntry(r+"sofa;",90,80,"","Sofa",null,null,this.getTagsForStencil(l,"sofa",n).join(" ")),this.createVertexTemplateEntry(r+"spiral_stairs;",200,200,"","Spiral Stairs",null,null,this.getTagsForStencil(l,"spiral_stairs",n).join(" ")),this.createVertexTemplateEntry(r+"table;",90,50,"","Table",null,null,this.getTagsForStencil(l,"table",n).join(" ")),this.createVertexTemplateEntry(r+"toilet;",50,67,"","Toilet",null,null,this.getTagsForStencil(l,"toilet",n).join(" ")),this.createVertexTemplateEntry(r+"water_cooler;",40,40,"","Water Cooler",null,null,this.getTagsForStencil(l,"water_cooler",n).join(" ")),this.createVertexTemplateEntry(r+"workstation;",50,40,"","Workstation",null,null,this.getTagsForStencil(l,"workstation",n).join(" ")),this.addEntry(n+"kitchen table small",(function(){var e=new mxCell("",new mxGeometry(0,20,80,80),"shape=rect;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(20,0,40,52),r+"chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(20,68,40,52),r+"chair;shadow=0;rotation=180;");return l.vertex=!0,sb.createVertexTemplateFromCells([t,l,e],80,120,"Small kitchen table")})),this.addEntry(n+"kitchen table",(function(){var e=new mxCell("",new mxGeometry(20,20,100,100),"shape=rect;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,52),r+"chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,88,40,52),r+"chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,52,40),r+"chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(88,50,52,40),r+"chair;shadow=0;direction=south");return o.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,e],140,140,"Kitchen table")})),this.addEntry(n+"kitchen table",(function(){var e=new mxCell("",new mxGeometry(20,20,100,100),"shape=ellipse;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,52),r+"chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,88,40,52),r+"chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,52,40),r+"chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(88,50,52,40),r+"chair;shadow=0;direction=south");return o.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,e],140,140,"Round kitchen table")})),this.addEntry(n+"kitchen table large",(function(){var e=new mxCell("",new mxGeometry(20,20,160,100),"shape=rect;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,52),r+"chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,88,40,52),r+"chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,52,40),r+"chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(148,50,52,40),r+"chair;shadow=0;direction=south");o.vertex=!0;var i=new mxCell("",new mxGeometry(110,0,40,52),r+"chair;shadow=0;");i.vertex=!0;var a=new mxCell("",new mxGeometry(110,88,40,52),r+"chair;shadow=0;direction=west;");return a.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,i,a,e],200,140,"Large kitchen table")})),this.addEntry(n+"kitchen table large",(function(){var e=new mxCell("",new mxGeometry(20,20,160,100),"shape=ellipse;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,52),r+"chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,88,40,52),r+"chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,52,40),r+"chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(148,50,52,40),r+"chair;shadow=0;direction=south");o.vertex=!0;var i=new mxCell("",new mxGeometry(110,0,40,52),r+"chair;shadow=0;");i.vertex=!0;var a=new mxCell("",new mxGeometry(110,88,40,52),r+"chair;shadow=0;direction=west;");return a.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,i,a,e],200,140,"Large kitchen table")})),this.addEntry(n+"office table",(function(){var e=new mxCell("",new mxGeometry(0,20,80,50),"shape=rect;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(20,0,40,43),r+"office_chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(15,30,50,40),r+"workstation;shadow=0;flipV=1;");return l.vertex=!0,sb.createVertexTemplateFromCells([t,e,l],80,70,"Office table")})),this.addEntry(n+"office table",(function(){var e=new mxCell("",new mxGeometry(20,20,100,100),"shape=rect;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,43),r+"office_chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,97,40,43),r+"office_chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,43,40),r+"office_chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(97,50,43,40),r+"office_chair;shadow=0;direction=south");return o.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,e],140,140,"Office table")})),this.addEntry(n+"office table large",(function(){var e=new mxCell("",new mxGeometry(20,20,160,100),"shape=rect;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,43),r+"office_chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,97,40,43),r+"office_chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,43,40),r+"office_chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(157,50,43,40),r+"office_chair;shadow=0;direction=south");o.vertex=!0;var i=new mxCell("",new mxGeometry(110,0,40,43),r+"office_chair;shadow=0;");i.vertex=!0;var a=new mxCell("",new mxGeometry(110,97,40,43),r+"office_chair;shadow=0;direction=west;");return a.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,i,a,e],200,140,"Large office table")})),this.addEntry(n+"office table large",(function(){var e=new mxCell("",new mxGeometry(20,20,160,100),"shape=ellipse;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,43),r+"office_chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,97,40,43),r+"office_chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,43,40),r+"office_chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(157,50,43,40),r+"office_chair;shadow=0;direction=south");o.vertex=!0;var i=new mxCell("",new mxGeometry(110,0,40,43),r+"office_chair;shadow=0;");i.vertex=!0;var a=new mxCell("",new mxGeometry(110,97,40,43),r+"office_chair;shadow=0;direction=west;");return a.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,i,a,e],200,140,"Large office table")})),this.addEntry(n+"office table large",(function(){var e=new mxCell("",new mxGeometry(20,20,280,100),"shape=ellipse;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,43),r+"office_chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,97,40,43),r+"office_chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,43,40),r+"office_chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(277,50,43,40),r+"office_chair;shadow=0;direction=south");o.vertex=!0;var i=new mxCell("",new mxGeometry(110,0,40,43),r+"office_chair;shadow=0;");i.vertex=!0;var a=new mxCell("",new mxGeometry(110,97,40,43),r+"office_chair;shadow=0;direction=west;");a.vertex=!0;var s=new mxCell("",new mxGeometry(170,0,40,43),r+"office_chair;shadow=0;");s.vertex=!0;var c=new mxCell("",new mxGeometry(170,97,40,43),r+"office_chair;shadow=0;direction=west;");c.vertex=!0;var h=new mxCell("",new mxGeometry(230,0,40,43),r+"office_chair;shadow=0;");h.vertex=!0;var m=new mxCell("",new mxGeometry(230,97,40,43),r+"office_chair;shadow=0;direction=west;");return m.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,i,a,s,c,h,m,e],320,140,"Large office table")})),this.addEntry(n+"office table conference large huge",(function(){var e=new mxCell("",new mxGeometry(20,20,520,100),"shape=ellipse;shadow=0;");e.vertex=!0;var t=new mxCell("",new mxGeometry(50,0,40,43),r+"office_chair;shadow=0;");t.vertex=!0;var l=new mxCell("",new mxGeometry(50,97,40,43),r+"office_chair;shadow=0;direction=west;");l.vertex=!0;var n=new mxCell("",new mxGeometry(0,50,43,40),r+"office_chair;shadow=0;direction=north;");n.vertex=!0;var o=new mxCell("",new mxGeometry(517,50,43,40),r+"office_chair;shadow=0;direction=south");o.vertex=!0;var i=new mxCell("",new mxGeometry(110,0,40,43),r+"office_chair;shadow=0;");i.vertex=!0;var a=new mxCell("",new mxGeometry(110,97,40,43),r+"office_chair;shadow=0;direction=west;");a.vertex=!0;var s=new mxCell("",new mxGeometry(170,0,40,43),r+"office_chair;shadow=0;");s.vertex=!0;var c=new mxCell("",new mxGeometry(170,97,40,43),r+"office_chair;shadow=0;direction=west;");c.vertex=!0;var h=new mxCell("",new mxGeometry(230,0,40,43),r+"office_chair;shadow=0;");h.vertex=!0;var m=new mxCell("",new mxGeometry(230,97,40,43),r+"office_chair;shadow=0;direction=west;");m.vertex=!0;var x=new mxCell("",new mxGeometry(290,0,40,43),r+"office_chair;shadow=0;");x.vertex=!0;var w=new mxCell("",new mxGeometry(290,97,40,43),r+"office_chair;shadow=0;direction=west;");w.vertex=!0;var d=new mxCell("",new mxGeometry(350,0,40,43),r+"office_chair;shadow=0;");d.vertex=!0;var u=new mxCell("",new mxGeometry(350,97,40,43),r+"office_chair;shadow=0;direction=west;");u.vertex=!0;var f=new mxCell("",new mxGeometry(410,0,40,43),r+"office_chair;shadow=0;");f.vertex=!0;var g=new mxCell("",new mxGeometry(410,97,40,43),r+"office_chair;shadow=0;direction=west;");g.vertex=!0;var v=new mxCell("",new mxGeometry(470,0,40,43),r+"office_chair;shadow=0;");v.vertex=!0;var p=new mxCell("",new mxGeometry(470,97,40,43),r+"office_chair;shadow=0;direction=west;");return p.vertex=!0,sb.createVertexTemplateFromCells([t,l,n,o,i,a,s,c,h,m,x,w,d,u,f,g,v,p,e],560,140,"Conference table")}))];this.addPalette("floorplan",mxResources.get("floorplans"),!1,mxUtils.bind(this,(function(e){for(var t=0;t<o.length;t++)e.appendChild(o[t](e))}))),this.setCurrentSearchEntryLibrary()};