mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
Fixed an incorrect reference to an outer variable (actor) when processing actor widths
This commit is contained in:
@@ -991,7 +991,7 @@ const calculateActorMargins = function(actors, actorToMessageWidth) {
|
|||||||
|
|
||||||
[actor, nextActor].forEach(function(act) {
|
[actor, nextActor].forEach(function(act) {
|
||||||
if (act.wrap) {
|
if (act.wrap) {
|
||||||
actor.description = utils.wrapLabel(actor.description, conf.width, textConf);
|
act.description = utils.wrapLabel(act.description, conf.width, textConf);
|
||||||
}
|
}
|
||||||
const actDims = utils.calculateTextDimensions(act.description, textConf);
|
const actDims = utils.calculateTextDimensions(act.description, textConf);
|
||||||
act.width = act.wrap ? conf.width : Math.max(conf.width, actDims.width);
|
act.width = act.wrap ? conf.width : Math.max(conf.width, actDims.width);
|
||||||
|
Reference in New Issue
Block a user