mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 07:49:43 +02:00
Reverting PR #2312
This commit is contained in:
@@ -778,13 +778,12 @@ const d3Attrs = function (d3Elem, attrs) {
|
||||
|
||||
export const calculateSvgSizeAttrs = function (height, width, useMaxWidth) {
|
||||
let attrs = new Map();
|
||||
attrs.set('height', height);
|
||||
if (useMaxWidth) {
|
||||
attrs.set('width', '100%');
|
||||
attrs.set('height', '100%');
|
||||
attrs.set('style', `max-width: ${width}px;`);
|
||||
} else {
|
||||
attrs.set('width', width);
|
||||
attrs.set('height', height);
|
||||
}
|
||||
return attrs;
|
||||
};
|
||||
|
Reference in New Issue
Block a user