mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-24 17:59:39 +02:00
Merge branch 'develop' of github.com:mermaid-js/mermaid into develop
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
import { logger } from '../../logger';
|
import { logger } from '../../logger';
|
||||||
|
|
||||||
|
let prevActor = undefined;
|
||||||
let actors = {};
|
let actors = {};
|
||||||
let messages = [];
|
let messages = [];
|
||||||
const notes = [];
|
const notes = [];
|
||||||
let title = '';
|
let title = '';
|
||||||
let sequenceNumbersEnabled = false;
|
let sequenceNumbersEnabled = false;
|
||||||
|
|
||||||
export const addActor = function(id, name, description) {
|
export const addActor = function(id, name, description) {
|
||||||
// Don't allow description nulling
|
// Don't allow description nulling
|
||||||
const old = actors[id];
|
const old = actors[id];
|
||||||
@@ -13,7 +15,12 @@ export const addActor = function(id, name, description) {
|
|||||||
// Don't allow null descriptions, either
|
// Don't allow null descriptions, either
|
||||||
if (description == null) description = name;
|
if (description == null) description = name;
|
||||||
|
|
||||||
actors[id] = { name: name, description: description };
|
actors[id] = { name: name, description: description, prevActor: prevActor };
|
||||||
|
if (prevActor && actors[prevActor]) {
|
||||||
|
actors[prevActor].nextActor = actors[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
prevActor = id;
|
||||||
};
|
};
|
||||||
|
|
||||||
const activationCount = part => {
|
const activationCount = part => {
|
||||||
|
Reference in New Issue
Block a user