You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
9.0 KiB
JavaScript
1 line
9.0 KiB
JavaScript
|
9 months ago
|
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[998],{70998:function(t,e,a){a.d(e,{diagram:function(){return x}});var r=a(63627),i=a(36783),n=a(91605),d=a(77832),o=a(51893);a(89539),a(99824),a(68985);let l=0,s=function(t){let e=t.id;return t.type&&(e+="<"+(0,o.v)(t.type)+">"),e},p=function(t,e,a,r){let{displayText:i,cssStyle:n}=e.getDisplayDetails(),d=t.append("tspan").attr("x",r.padding).text(i);""!==n&&d.attr("style",e.cssStyle),a||d.attr("dy",r.textHeight)},g={getClassTitleString:s,drawClass:function(t,e,a,r){let i,n,d,l;o.l.debug("Rendering class ",e,a);let g=e.id,c={id:g,label:e.id,width:0,height:0},h=t.append("g").attr("id",r.db.lookUpDomId(g)).attr("class","classGroup");i=e.link?h.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",a.textHeight+a.padding).attr("x",0):h.append("text").attr("y",a.textHeight+a.padding).attr("x",0);let f=!0;e.annotations.forEach(function(t){let e=i.append("tspan").text("\xab"+t+"\xbb");f||e.attr("dy",a.textHeight),f=!1});let x=s(e),u=i.append("tspan").text(x).attr("class","title");f||u.attr("dy",a.textHeight);let y=i.node().getBBox().height;if(e.members.length>0){n=h.append("line").attr("x1",0).attr("y1",a.padding+y+a.dividerMargin/2).attr("y2",a.padding+y+a.dividerMargin/2);let t=h.append("text").attr("x",a.padding).attr("y",y+a.dividerMargin+a.textHeight).attr("fill","white").attr("class","classText");f=!0,e.members.forEach(function(e){p(t,e,f,a),f=!1}),d=t.node().getBBox()}if(e.methods.length>0){l=h.append("line").attr("x1",0).attr("y1",a.padding+y+a.dividerMargin+d.height).attr("y2",a.padding+y+a.dividerMargin+d.height);let t=h.append("text").attr("x",a.padding).attr("y",y+2*a.dividerMargin+d.height+a.textHeight).attr("fill","white").attr("class","classText");f=!0,e.methods.forEach(function(e){p(t,e,f,a),f=!1})}let b=h.node().getBBox();var m=" ";e.cssClasses.length>0&&(m+=e.cssClasses.join(" "));let w=h.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*a.padding).attr("height",b.height+a.padding+.5*a.dividerMargin).attr("class",m).node().getBBox().width;return i.node().childNodes.forEach(function(t){t.setAttribute("x",(w-t.getBBox().width)/2)}),e.tooltip&&i.insert("title").text(e.tooltip),n&&n.attr("x2",w),l&&l.attr("x2",w),c.width=w,c.height=b.height+a.padding+.5*a.dividerMargin,c},drawEdge:function(t,e,a,r,n){let d,s,p,g,c,h;let f=function(t){switch(t){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(t=>!Number.isNaN(t.y));let x=e.points,u=(0,i.jvg)().x(function(t){return t.x}).y(function(t){return t.y}).curve(i.$0Z),y=t.append("path").attr("d",u(x)).attr("id","edge"+l).attr("class","relation"),b="";r.arrowMarkerAbsolute&&(b=(b=(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==a.relation.lineType&&y.attr("class","relation dashed-line"),10==a.relation.lineType&&y.attr("class","relation dotted-line"),"none"!==a.relation.type1&&y.attr("marker-start","url("+b+"#"+f(a.relation.type1)+"Start)"),"none"!==a.relation.type2&&y.attr("marker-end","url("+b+"#"+f(a.relation.type2)+"End)");let m=e.points.length,w=o.u.calcLabelPosition(e.points);if(d=w.x,s=w.y,m%2!=0&&m>1){let t=o.u.calcCardinalityPosition("none"!==a.relation.type1,e.points,e.points[0]),r=o.u.calcCardinalityPosition("none"!==a.relation.type2,e.points,e.points[m-1]);o.l.debug("cardinality_1_point "+JSON.stringify(t)),o.l.debug("cardinality_2_point "+JSON.stringify(r)),p=t.x,g=t.y,c=r.x,h=r.y}if(void 0!==a.title){let e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",d).attr("y",s).attr("fill","red").attr("text-anchor","middle").text(a.title);window.label=i;let n=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",n.x-r.padding/2).attr(
|