Reverting PR #2312

This commit is contained in:
Ashish Jain
2021-09-29 18:22:35 +02:00
parent 4839e6a8b3
commit 38ef061175
10 changed files with 28 additions and 12 deletions

View File

@@ -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;
};