mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Merge pull request #1332 from Soptq/stateRenderer
Add useMaxWidth to stateRenderer
This commit is contained in:
commit
fffb0eafde
@ -75,8 +75,13 @@ export const draw = function(text, id) {
|
||||
const width = bounds.width + padding * 2;
|
||||
const height = bounds.height + padding * 2;
|
||||
|
||||
if (conf.useMaxWidth) {
|
||||
diagram.attr('width', '100%');
|
||||
diagram.attr('style', `max-width: ${width * 1.75}px;`);
|
||||
} else {
|
||||
// Zoom in a bit
|
||||
diagram.attr('width', width * 1.75);
|
||||
}
|
||||
// diagram.attr('height', bounds.height * 3 + conf.padding * 2);
|
||||
diagram.attr(
|
||||
'viewBox',
|
||||
|
Loading…
x
Reference in New Issue
Block a user