@zklogic/draw.io
Version:
Draw.IO - Graph Editor integration in Angular-cli
1 lines • 3.81 kB
JavaScript
function mxShapeCisco19Rect(e,t,n,i){mxShape.call(this),this.bounds=e,this.fill=t,this.stroke=n,this.strokewidth=null!=i?i:1}mxUtils.extend(mxShapeCisco19Rect,mxShape),mxShapeCisco19Rect.prototype.cst={SHAPE_RECT:"mxgraph.cisco19.rect"},mxShapeCisco19Rect.prototype.paintVertexShape=function(e,t,n,i,s){var r=mxUtils.getValue(this.state.style,"prIcon","l2_switch"),o=(mxUtils.getValue(this.state.style,"fillColor","#ffffff"),mxUtils.getValue(this.state.style,"strokeColor","#000000")),c="mxgraph.cisco19.bg1",a=["router","csr_1000v","wireless_router","l3_modular3","ucs_express","router_with_voice","router_with_firewall","netflow_router","secure_router","ip_telephone_router","asr_9000","clock","vbond","vmanage","vsmart"];e.translate(t,n),["l2_modular","l3_modular","6500_vss","nexus_9500","nexus_7k"].includes(r)?c="mxgraph.cisco19.bg2":["l2_switch_with_dual_supervisor","l3_switch_with_dual_supervisor"].includes(r)?c="mxgraph.cisco19.bg3":["l2_modular2"].includes(r)?c="mxgraph.cisco19.bg4":["l3_modular2","6500_vss2","hypervisor","collab1"].includes(r)?c="mxgraph.cisco19.bg5":a.includes(r)?(e.begin(),"wireless_router"==r?e.ellipse(0,.17*s,i,.83*s):e.ellipse(0,0,i,s),e.fill()):["content_router","router_with_firewall2","netflow_router2","nam_virtual_service_blade","ucs_5108_blade_chassis","storage","nexus_1kv_vsm","nexus_1k","nexus_1010","dual mode access point","wireless_lan_controller","primary_codec","virtual_desktop_service","video_gateway","video_analytics","telepresence_exchange","meeting_scheduling_and_management_server","content_recording_streaming_server","communications_manager","cisco_unified_presence_service","cisco_unified_contact_center_enterprise_and_hosted","h323","monitor","telepresence_endpoint_twin_data_display","operations_manager","transcoder","contact_center_express","ip_ip_gateway","shield","set_top","da_encoder","ad_encoder","da_decoder","ad_decoder","acs","email_security","vpn_concentrator","ssl_terminator","cisco_security_manager","web_security","nac_appliance","ironport","ips_ids","firewall","asa_5500","flow_collector","load_balancer","web_application_firewall","analysis_correlation","flow_analytics","virtual_private_network2","web_security_services","web_security_services2","virtual_private_network_connector"].includes(r)?c="mxgraph.cisco19.bg6":["asr_1000"].includes(r)?c="mxgraph.cisco19.bg7":["fibre_channel_director_mds_9000","fibre_channel_fabric_switch"].includes(r)?c="mxgraph.cisco19.bg8":["ucs_c_series_server"].includes(r)?c="mxgraph.cisco19.bg9":["aci"].includes(r)?mxStencilRegistry.getStencil("mxgraph.cisco19.acibg").drawShape(e,this,.195*i,.195*s,.61*i,.61*s):["immersive_telepresence_endpoint"].includes(r)&&(c="mxgraph.cisco19.bg10"),a.includes(r)||"aci"==r||mxStencilRegistry.getStencil(c).drawShape(e,this,0,0,i,s),e.setShadow(!1);var _=mxStencilRegistry.getStencil("mxgraph.cisco19."+r);e.setFillColor(o),null!=_&&_.drawShape(e,this,0,0,i,s)},mxCellRenderer.registerShape(mxShapeCisco19Rect.prototype.cst.SHAPE_RECT,mxShapeCisco19Rect),mxShapeCisco19Rect.prototype.getConstraints=function(e,t,n){var i=[];return i.push(new mxConnectionConstraint(new mxPoint(.825,.5),!1)),i.push(new mxConnectionConstraint(new mxPoint(.175,.5),!1)),i.push(new mxConnectionConstraint(new mxPoint(.5,.16),!1)),i.push(new mxConnectionConstraint(new mxPoint(.5,.84),!1)),i.push(new mxConnectionConstraint(new mxPoint(.66,.17),!1)),i.push(new mxConnectionConstraint(new mxPoint(.66,.83),!1)),i.push(new mxConnectionConstraint(new mxPoint(.34,.17),!1)),i.push(new mxConnectionConstraint(new mxPoint(.34,.83),!1)),i.push(new mxConnectionConstraint(new mxPoint(.75,.33),!1)),i.push(new mxConnectionConstraint(new mxPoint(.75,.67),!1)),i.push(new mxConnectionConstraint(new mxPoint(.25,.33),!1)),i.push(new mxConnectionConstraint(new mxPoint(.25,.67),!1)),i};