mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02:00
Add accDescription field to state diagrams
This commit is contained in:
@@ -9,6 +9,7 @@ import { parser } from './parser/stateDiagram';
|
||||
import { drawState, addTitleAndBox, drawEdge } from './shapes';
|
||||
import { getConfig } from '../../config';
|
||||
import { configureSvgSize } from '../../utils';
|
||||
import addSVGAccessibilityFields from '../../accessibility';
|
||||
|
||||
parser.yy = stateDb;
|
||||
|
||||
@@ -97,6 +98,7 @@ export const draw = function (text, id) {
|
||||
'viewBox',
|
||||
`${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + ' ' + height
|
||||
);
|
||||
addSVGAccessibilityFields(parser.yy, diagram, id);
|
||||
};
|
||||
const getLabelWidth = (text) => {
|
||||
return text ? text.length * conf.fontSizeFactor : 1;
|
||||
|
Reference in New Issue
Block a user