2 lines
700 B
JavaScript
2 lines
700 B
JavaScript
import{_ as a,m as r,o as d,n as g}from"./state.Bw4wwf0I.js";var u=a((t,e)=>{let o;return e==="sandbox"&&(o=r("#i"+t)),(e==="sandbox"?r(o.nodes()[0].contentDocument.body):r("body")).select(`[id="${t}"]`)},"getDiagramElement"),b=a((t,e,o,i)=>{t.attr("class",o);const{width:n,height:s,x:h,y:x}=m(t,e);d(t,s,n,i);const c=w(h,x,n,s,e);t.attr("viewBox",c),g.debug(`viewBox configured: ${c} with padding: ${e}`)},"setupViewPortForSVG"),m=a((t,e)=>{var i;const o=((i=t.node())==null?void 0:i.getBBox())||{width:0,height:0,x:0,y:0};return{width:o.width+e*2,height:o.height+e*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),w=a((t,e,o,i,n)=>`${t-n} ${e-n} ${o} ${i}`,"createViewBox");export{u as g,b as s};
|