Increase puppeteer viewport width for resizing (#374)
This commit is contained in:
@@ -313,6 +313,7 @@ export const svg = {
|
|||||||
//Render through browser and resize height
|
//Render through browser and resize height
|
||||||
console.debug("metrics/svg/resize > loading svg")
|
console.debug("metrics/svg/resize > loading svg")
|
||||||
const page = await svg.resize.browser.newPage()
|
const page = await svg.resize.browser.newPage()
|
||||||
|
page.setViewport({width:980, height:980})
|
||||||
page.on("console", ({_text:text}) => console.debug(`metrics/svg/resize > puppeteer > ${text}`))
|
page.on("console", ({_text:text}) => console.debug(`metrics/svg/resize > puppeteer > ${text}`))
|
||||||
await page.setContent(rendered, {waitUntil:["load", "domcontentloaded", "networkidle2"]})
|
await page.setContent(rendered, {waitUntil:["load", "domcontentloaded", "networkidle2"]})
|
||||||
console.debug("metrics/svg/resize > loaded svg successfully")
|
console.debug("metrics/svg/resize > loaded svg successfully")
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
<span>Last updated <%= meta.generated %> <% if ((config.timezone?.name)&&(!config.timezone?.error)) { %>(timezone <%= config.timezone.name %>)<% } %> with lowlighter/metrics@<%= meta.version %></span>
|
<span>Last updated <%= meta.generated %> <% if ((config.timezone?.name)&&(!config.timezone?.error)) { %>(timezone <%= config.timezone.name %>)<% } %> with lowlighter/metrics@<%= meta.version %></span>
|
||||||
</footer>
|
</footer>
|
||||||
<% } %>
|
<% } %>
|
||||||
<div id="metrics-end"></div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div id="metrics-end"></div>
|
||||||
</foreignObject>
|
</foreignObject>
|
||||||
|
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -30,7 +30,7 @@
|
|||||||
</footer>
|
</footer>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<div id="metrics-end"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div id="metrics-end"></div>
|
||||||
</foreignObject>
|
</foreignObject>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -56,8 +56,8 @@ Last generated: <%= meta.generated %>
|
|||||||
<footer>Connection reset by <%= Math.floor(256*Math.random()) %>.<%= Math.floor(256*Math.random()) %>.<%= Math.floor(256*Math.random()) %>.<%= Math.floor(256*Math.random()) %></footer><%# -%>
|
<footer>Connection reset by <%= Math.floor(256*Math.random()) %>.<%= Math.floor(256*Math.random()) %>.<%= Math.floor(256*Math.random()) %>.<%= Math.floor(256*Math.random()) %></footer><%# -%>
|
||||||
<% } -%></pre>
|
<% } -%></pre>
|
||||||
|
|
||||||
<div id="metrics-end"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div id="metrics-end"></div>
|
||||||
</foreignObject>
|
</foreignObject>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user