1
0
Fork 0

chore: Keep SVG to max height of the screen

This commit is contained in:
Joost De Cock 2022-06-29 13:36:41 +02:00
parent f0d3f21070
commit 2da980592a

View file

@ -60,7 +60,12 @@ const Draft = props => {
return (
<div className="my-8 w-11/12 m-auto border-2 border-dotted border-base-content shadow">
<Svg {...patternProps} embed={gist.embed} ref={svgRef} viewBox={layout.topLeft ? `${layout.topLeft.x} ${layout.topLeft.y} ${layout.width} ${layout.height}` : false}>
<Svg {...patternProps}
embed={gist.embed}
ref={svgRef}
viewBox={layout.topLeft ? `${layout.topLeft.x} ${layout.topLeft.y} ${layout.width} ${layout.height}` : false}
style={{maxHeight: '100vh'}}
>
<Defs {...patternProps} />
<style>{`:root { --pattern-scale: ${gist.scale || 1}}`}</style>
<g>