mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-27 20:26:47 +02:00
fix: refactored code
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -706,10 +706,9 @@ const drawActorTypeControl = function (elem, actor, conf, isFooter) {
|
|||||||
|
|
||||||
// Draw looping arrow as arc path
|
// Draw looping arrow as arc path
|
||||||
actElem
|
actElem
|
||||||
.append('path')
|
.append('line')
|
||||||
.attr('d', `M ${cx},${cy - r}`)
|
.attr('marker-end', 'url(#filled-head-control)')
|
||||||
.attr('stroke-width', 1.5)
|
.attr('transform', `translate(${cx}, ${cy - r})`);
|
||||||
.attr('marker-end', 'url(#filled-head-control)');
|
|
||||||
|
|
||||||
const bounds = actElem.node().getBBox();
|
const bounds = actElem.node().getBBox();
|
||||||
actor.height = bounds.height + 2 * (conf?.sequence?.labelBoxHeight ?? 0);
|
actor.height = bounds.height + 2 * (conf?.sequence?.labelBoxHeight ?? 0);
|
||||||
@@ -775,7 +774,7 @@ const drawActorTypeEntity = function (elem, actor, conf, isFooter) {
|
|||||||
.attr('stroke-width', 2);
|
.attr('stroke-width', 2);
|
||||||
|
|
||||||
const bounds = actElem.node().getBBox();
|
const bounds = actElem.node().getBBox();
|
||||||
actor.height = bounds.height + (conf.sequence.labelBoxHeight ?? 0);
|
actor.height = bounds.height + (conf?.sequence?.labelBoxHeight ?? 0);
|
||||||
|
|
||||||
if (!isFooter) {
|
if (!isFooter) {
|
||||||
actorCnt++;
|
actorCnt++;
|
||||||
|
Reference in New Issue
Block a user