mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-10 09:39:38 +02:00
ensure maxLabelWidth is a number
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
This commit is contained in:
@@ -22,6 +22,10 @@ function drawActorLegend(diagram) {
|
|||||||
maxWidth = 0;
|
maxWidth = 0;
|
||||||
let yPos = 60;
|
let yPos = 60;
|
||||||
|
|
||||||
|
if (isNaN(maxLabelWidth)) {
|
||||||
|
throw new Error('maxLabelWidth must be a number');
|
||||||
|
}
|
||||||
|
|
||||||
Object.keys(actors).forEach((person) => {
|
Object.keys(actors).forEach((person) => {
|
||||||
const colour = actors[person].color;
|
const colour = actors[person].color;
|
||||||
const circleData = {
|
const circleData = {
|
||||||
|
Reference in New Issue
Block a user