UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 13.9 kB
Sidebar.prototype.addCabinetsPalette=function(){var e=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=bottom;dashed=0;shadow=0;html=1;align=center;"+mxConstants.STYLE_VERTICAL_ALIGN+"=top;shape=mxgraph.cabinets.",t=mxConstants.STYLE_VERTICAL_LABEL_POSITION+"=middle;dashed=0;shadow=0;html=1;shape=mxgraph.cabinets.",r=50,n=50,l="mxgraph.cabinets",i="cabinet ",a=this;this.setCurrentSearchEntryLibrary("cabinets");var o=[this.createVertexTemplateEntry(e+"cabinet;hasStand=1",250,500,"","Cabinet",null,null,this.getTagsForStencil(l,"cabinet",i).join(" ")),this.createVertexTemplateEntry(t+"dimension;verticalAlign=top;align=center;",250,40,"100","Dimension",null,null,this.getTagsForStencil(l,"dimension",i).join(" ")),this.createVertexTemplateEntry(t+"dimensionBottom;verticalAlign=bottom;align=center;",250,40,"100","Dimension",null,null,this.getTagsForStencil(l,"dimensionBottom",i).join(" ")),this.createVertexTemplateEntry(e+"coverPlate",4.4*r,125,"","Cover Plate",null,null,this.getTagsForStencil(l,"coverPlate",i).join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;",4.4*r,12.5,"25x40","Panel Wiring System 25x40mm",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;",4.4*r,20,"40x40","Panel Wiring System 40x40mm",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;",4.4*r,30,"60x40","Panel Wiring System 60x40mm",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;",4.4*r,40,"80x40","Panel Wiring System 80x40mm",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;",4.4*r,n,"100x40","Panel Wiring System 100x40mm",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",12.5,350,"25x40","Panel Wiring System 25x40mm (Vertical)",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",20,350,"40x40","Panel Wiring System 40x40mm (Vertical)",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",30,350,"60x40","Panel Wiring System 60x40mm (Vertical)",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",40,350,"80x40","Panel Wiring System 80x40mm (Vertical)",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry("shape=rect;dashed=0;shadow=0;html=1;whiteSpace=wrap;direction=south;horizontal=0;",r,350,"100x40","Panel Wiring System 100x40mm (Vertical)",null,null,this.getTagsForStencil(l,"",i+"panel wiring system").join(" ")),this.createVertexTemplateEntry(e+"cb_1p;",9,n,"","Circuit Breaker (1P)",null,null,this.getTagsForStencil(l,"cb_1p",i).join(" ")),this.addEntry(i+"circuit breaker row",(function(){var t=new mxCell("",new mxGeometry(0,0,9,n),e+"cb_1p;");t.vertex=!0;var r=new mxCell("",new mxGeometry(9,0,9,n),e+"cb_1p;");r.vertex=!0;var l=new mxCell("",new mxGeometry(18,0,9,n),e+"cb_1p;");l.vertex=!0;var i=new mxCell("",new mxGeometry(27,0,9,n),e+"cb_1p;");i.vertex=!0;var o=new mxCell("",new mxGeometry(36,0,9,n),e+"cb_1p;");o.vertex=!0;var c=new mxCell("",new mxGeometry(45,0,9,n),e+"cb_1p;");c.vertex=!0;var m=new mxCell("",new mxGeometry(54,0,9,n),e+"cb_1p;");m.vertex=!0;var s=new mxCell("",new mxGeometry(63,0,9,n),e+"cb_1p;");s.vertex=!0;var _=new mxCell("",new mxGeometry(72,0,9,n),e+"cb_1p;");_.vertex=!0;var h=new mxCell("",new mxGeometry(81,0,9,n),e+"cb_1p;");return h.vertex=!0,a.createVertexTemplateFromCells([t,r,l,i,o,c,m,s,_,h],90,n,"Circuit Breaker (1P x 10)")})),this.createVertexTemplateEntry(e+"cb_2p;",18,n,"","Circuit Breaker (2P)",null,null,this.getTagsForStencil(l,"cb_2p",i).join(" ")),this.addEntry(i+"circuit breaker row",(function(){var t=new mxCell("",new mxGeometry(0,0,18,n),e+"cb_2p;");t.vertex=!0;var r=new mxCell("",new mxGeometry(18,0,18,n),e+"cb_2p;");r.vertex=!0;var l=new mxCell("",new mxGeometry(36,0,18,n),e+"cb_2p;");l.vertex=!0;var i=new mxCell("",new mxGeometry(54,0,18,n),e+"cb_2p;");i.vertex=!0;var o=new mxCell("",new mxGeometry(72,0,18,n),e+"cb_2p;");o.vertex=!0;var c=new mxCell("",new mxGeometry(90,0,18,n),e+"cb_2p;");c.vertex=!0;var m=new mxCell("",new mxGeometry(108,0,18,n),e+"cb_2p;");m.vertex=!0;var s=new mxCell("",new mxGeometry(126,0,18,n),e+"cb_2p;");s.vertex=!0;var _=new mxCell("",new mxGeometry(144,0,18,n),e+"cb_2p;");_.vertex=!0;var h=new mxCell("",new mxGeometry(162,0,18,n),e+"cb_2p;");return h.vertex=!0,a.createVertexTemplateFromCells([t,r,l,i,o,c,m,s,_,h],180,n,"Circuit Breaker (2P x 10)")})),this.createVertexTemplateEntry(e+"cb_3p;",27,n,"","Circuit Breaker (3P)",null,null,this.getTagsForStencil(l,"cb_3p",i).join(" ")),this.addEntry(i+"circuit breaker row",(function(){var t=new mxCell("",new mxGeometry(0,0,27,n),e+"cb_3p;");t.vertex=!0;var r=new mxCell("",new mxGeometry(27,0,27,n),e+"cb_3p;");r.vertex=!0;var l=new mxCell("",new mxGeometry(54,0,27,n),e+"cb_3p;");l.vertex=!0;var i=new mxCell("",new mxGeometry(81,0,27,n),e+"cb_3p;");i.vertex=!0;var o=new mxCell("",new mxGeometry(108,0,27,n),e+"cb_3p;");return o.vertex=!0,a.createVertexTemplateFromCells([t,r,l,i,o],135,n,"Circuit Breaker (3P x 5)")})),this.createVertexTemplateEntry(e+"cb_4p;",36,n,"","Circuit Breaker (4P)",null,null,this.getTagsForStencil(l,"cb_4p",i).join(" ")),this.addEntry(i+"circuit breaker row",(function(){var t=new mxCell("",new mxGeometry(0,0,36,n),e+"cb_4p;");t.vertex=!0;var r=new mxCell("",new mxGeometry(36,0,36,n),e+"cb_4p;");r.vertex=!0;var l=new mxCell("",new mxGeometry(72,0,36,n),e+"cb_4p;");l.vertex=!0;var i=new mxCell("",new mxGeometry(108,0,36,n),e+"cb_4p;");i.vertex=!0;var o=new mxCell("",new mxGeometry(144,0,36,n),e+"cb_4p;");return o.vertex=!0,a.createVertexTemplateFromCells([t,r,l,i,o],180,n,"Circuit Breaker (4P x 5)")})),this.createVertexTemplateEntry(e+"cb_auxiliary_contact;",4.5,n,"","Auxiliary Contact (Circuit Breaker)",null,null,this.getTagsForStencil(l,"cb_auxiliary_contact",i).join(" ")),this.createVertexTemplateEntry(e+"contactor_1_32a;",27,43,"","Contactor (1-32A)",null,null,this.getTagsForStencil(l,"contactor_1_32a",i).join(" ")),this.createVertexTemplateEntry(e+"auxiliary_contact_contactor_1_32a;",4.5,43,"","Auxiliary Contact (Contactor 1-32A)",null,null,this.getTagsForStencil(l,"auxiliary_contact_contactor_1_32a",i).join(" ")),this.createVertexTemplateEntry(e+"contactor_32_125a;",30,n,"","Contactor 32 to 125A",null,null,this.getTagsForStencil(l,"contactor_32_125a",i).join(" ")),this.createVertexTemplateEntry(e+"auxiliary_contact_contactor_32_125a;",4.5,n,"","Auxiliary Contact (Contactor 32-125A)",null,null,this.getTagsForStencil(l,"auxiliary_contact_contactor_32_125a",i).join(" ")),this.createVertexTemplateEntry(e+"contactor_125_400a;",1.1*r,90,"","Contactor 125 to 400A",null,null,this.getTagsForStencil(l,"contactor_125_400a",i).join(" ")),this.createVertexTemplateEntry(e+"distribution_block_4p_125a_11_connections;",100,60,"","Distribution Block 4P 125A 11 Connections",null,null,this.getTagsForStencil(l,"distribution_block_4p_125a_11_connections",i).join(" ")),this.createVertexTemplateEntry(e+"distribution_block_4p_125a_11_connections_2;",100,n,"","Distribution Block 4P 125A 11 Connections",null,null,this.getTagsForStencil(l,"distribution_block_4p_125a_11_connections_2",i).join(" ")),this.createVertexTemplateEntry(e+"mccb_25_63a_3p;",60,90,"","MCCB 25-63A 3P",null,null,this.getTagsForStencil(l,"mccb_25_63a_3p",i).join(" ")),this.createVertexTemplateEntry(e+"mccb_25_63a_4p;",80,90,"","MCCB 25-63A 4P",null,null,this.getTagsForStencil(l,"mccb_25_63a_4p",i).join(" ")),this.createVertexTemplateEntry(e+"mccb_63_250a_3p;",70,105,"","MCCB 63-250A 3P",null,null,this.getTagsForStencil(l,"mccb_63_250a_3p",i).join(" ")),this.createVertexTemplateEntry(e+"mccb_63_250a_4p;",95,105,"","MCCB 63-250A 4P",null,null,this.getTagsForStencil(l,"mccb_63_250a_4p",i).join(" ")),this.createVertexTemplateEntry(e+"motorized_switch_3p;",85,70,"","Motorized Switch 3P",null,null,this.getTagsForStencil(l,"motorized_switch_3p",i).join(" ")),this.createVertexTemplateEntry(e+"motorized_switch_4p;",100,70,"","Motorized Switch 4P",null,null,this.getTagsForStencil(l,"motorized_switch_4p",i).join(" ")),this.createVertexTemplateEntry(e+"motor_cb_1_32a;",27,43,"","Motor Circuit Breaker 1-32A",null,null,this.getTagsForStencil(l,"motor_cb_1_32a",i).join(" ")),this.createVertexTemplateEntry(e+"motor_cb_32_125a;",30,n,"","Motor Circuit Breaker 32-125A",null,null,this.getTagsForStencil(l,"motor_cb_32_125a",i).join(" ")),this.createVertexTemplateEntry(e+"motor_cb_125_400a;",1.1*r,90,"","Motor Circuit Breaker 125-400A",null,null,this.getTagsForStencil(l,"motor_cb_125_400a",i).join(" ")),this.createVertexTemplateEntry(e+"motor_protection_cb;",27,n,"","Motor Protection CB",null,null,this.getTagsForStencil(l,"motor_protection_cb",i).join(" ")),this.createVertexTemplateEntry(e+"motor_starter_1_32a;",27,43,"","Motor Circuit Breaker 1-32A",null,null,this.getTagsForStencil(l,"motor_starter_1_32a",i).join(" ")),this.createVertexTemplateEntry(e+"motor_starter_32_125a;",30,n,"","Motor Circuit Breaker 32-125A",null,null,this.getTagsForStencil(l,"motor_starter_32_125a",i).join(" ")),this.createVertexTemplateEntry(e+"motor_starter_125_400a;",1.1*r,90,"","Motor Circuit Breaker 125-400A",null,null,this.getTagsForStencil(l,"motor_starter_125_400a",i).join(" ")),this.createVertexTemplateEntry(e+"overcurrent_relay_1_32a;",27,15,"","Overcurrent Relay 1-32A",null,null,this.getTagsForStencil(l,"overcurrent_relay_1_32a",i).join(" ")),this.createVertexTemplateEntry(e+"overcurrent_relay_32_125a;",30,16.5,"","Overcurrent Relay 32-125A",null,null,this.getTagsForStencil(l,"overcurrent_relay_32_125a",i).join(" ")),this.createVertexTemplateEntry(e+"overcurrent_relay_125_400a;",1.1*r,30,"","Overcurrent Relay 125-400A",null,null,this.getTagsForStencil(l,"overcurrent_relay_125_400a",i).join(" ")),this.createVertexTemplateEntry(e+"plugin_relay_1;",3,40,"","Plugin Relay",null,null,this.getTagsForStencil(l,"plugin_relay_1",i).join(" ")),this.createVertexTemplateEntry(e+"plugin_relay_2;",12,40,"","Plugin Relay",null,null,this.getTagsForStencil(l,"plugin_relay_2",i).join(" ")),this.createVertexTemplateEntry(e+"din_rail;",500,25,"","DIN Rail",null,null,this.getTagsForStencil(l,"din_rail",i).join(" ")),this.createVertexTemplateEntry(e+"residual_current_device_2p;",18,n,"","Residual Current Device 2p",null,null,this.getTagsForStencil(l,"residual_current_device_2p",i).join(" ")),this.createVertexTemplateEntry(e+"residual_current_device_4p;",36,n,"","Residual Current Device 4p",null,null,this.getTagsForStencil(l,"residual_current_device_4p",i).join(" ")),this.createVertexTemplateEntry(e+"surge_protection_1p;",9,n,"","Surge Protection 1p",null,null,this.getTagsForStencil(l,"surge_protection_1p",i).join(" ")),this.createVertexTemplateEntry(e+"surge_protection_2p;",18,n,"","Surge Protection 2p",null,null,this.getTagsForStencil(l,"surge_protection_2p",i).join(" ")),this.createVertexTemplateEntry(e+"surge_protection_3p;",27,n,"","Surge Protection 3p",null,null,this.getTagsForStencil(l,"surge_protection_3p",i).join(" ")),this.createVertexTemplateEntry(e+"surge_protection_4p;",36,n,"","Surge Protection 4p",null,null,this.getTagsForStencil(l,"surge_protection_4p",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_4mm2;",2.5,25,"","Terminal 4mm2",null,null,this.getTagsForStencil(l,"terminal_4mm2",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_4mm2_x10;",25,25,"","Terminal 4mm2 x10",null,null,this.getTagsForStencil(l,"terminal_4mm2_x10",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_4_6mm2;",2.5,30,"","Terminal 4-6mm2",null,null,this.getTagsForStencil(l,"terminal_4_6mm2",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_4_6mm2_x10;",25,30,"","Terminal 4-6mm2 x10",null,null,this.getTagsForStencil(l,"terminal_4_6mm2_x10",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_6_25mm2;",5,37.5,"","Terminal 6-25mm2",null,null,this.getTagsForStencil(l,"terminal_6_25mm2",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_6_25mm2_x10;",r,37.5,"","Terminal 6-25mm2 x10",null,null,this.getTagsForStencil(l,"terminal_6_25mm2_x10",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_40mm2;",11,n,"","Terminal 40mm2",null,null,this.getTagsForStencil(l,"terminal_40mm2",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_40mm2_x10;",2.2*r,n,"","Terminal 40mm2 x10",null,null,this.getTagsForStencil(l,"terminal_40mm2_x10",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_50mm2;",12.5,1.1*n,"","Terminal 50mm2",null,null,this.getTagsForStencil(l,"terminal_50mm2",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_50mm2_x10;",125,1.1*n,"","Terminal 50mm2 x10",null,null,this.getTagsForStencil(l,"terminal_50mm2_x10",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_75mm2;",15,70,"","Terminal 75mm2",null,null,this.getTagsForStencil(l,"terminal_75mm2",i).join(" ")),this.createVertexTemplateEntry(e+"terminal_75mm2_x10;",150,70,"","Terminal 75mm2 x10",null,null,this.getTagsForStencil(l,"terminal_75mm2_x10",i).join(" "))];this.addPalette("cabinets",mxResources.get("cabinets"),!1,mxUtils.bind(this,(function(e){for(var t=0;t<o.length;t++)e.appendChild(o[t](e))}))),this.setCurrentSearchEntryLibrary()};