fix: handling diagram width in sandbox mode

This commit is contained in:
Knut Sveidqvist
2022-02-03 19:54:24 +01:00
parent 46cdacfdc7
commit 882ba03fcb
4 changed files with 19 additions and 20 deletions

View File

@@ -528,7 +528,7 @@ const render = function (id, _txt, cb, container) {
let width = '100%';
let height = '100%';
if (svgEl) {
width = svgEl.viewBox.baseVal.width + 'px';
// width = svgEl.viewBox.baseVal.width + 'px';
height = svgEl.viewBox.baseVal.height + 'px';
}
svgCode = `<iframe style="width:${width};height:${height};border:0;margin:0;" src="data:text/html;base64,${btoa(