mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-02-04 07:13:25 +08:00
Missed activationWidth
new configuration option for sequence diagrams
This commit is contained in:
parent
217bd1f4bf
commit
6915634729
@ -137,6 +137,12 @@ const config = {
|
|||||||
* The object containing configurations specific for sequence diagrams
|
* The object containing configurations specific for sequence diagrams
|
||||||
*/
|
*/
|
||||||
sequence: {
|
sequence: {
|
||||||
|
/**
|
||||||
|
* widt of the activation rect
|
||||||
|
* **Default value 10**.
|
||||||
|
*/
|
||||||
|
activationWidth: 10,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* margin to the right and left of the sequence diagram.
|
* margin to the right and left of the sequence diagram.
|
||||||
* **Default value 50**.
|
* **Default value 50**.
|
||||||
|
@ -1002,8 +1002,8 @@ const calculateLoopBounds = function(messages, actors) {
|
|||||||
break;
|
break;
|
||||||
case parser.yy.LINETYPE.ACTIVE_START:
|
case parser.yy.LINETYPE.ACTIVE_START:
|
||||||
{
|
{
|
||||||
const actorRect = actors[msg.from.actor];
|
const actorRect = actors[msg.from ? msg.from.actor : msg.to.actor];
|
||||||
const stackedSize = actorActivations(msg.from.actor).length;
|
const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length;
|
||||||
const x =
|
const x =
|
||||||
actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;
|
actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;
|
||||||
const toAdd = {
|
const toAdd = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user