The print progress names its last step for what it does (preparing the print), and lets it paint before the print image is drawn

This commit is contained in:
Doxa Maps 2026-10-03 14:44:00 +00:00
parent b2ab82a2e7
commit 12cc87c247
12 changed files with 14 additions and 12 deletions

View file

@ -324,7 +324,7 @@ const STEP_EN = {
records: 'loading the people groups', boundaries: 'loading the map outlines', generator: 'loading the poster engine',
'map-frame': 'fitting the map', neighbours: 'drawing the neighbouring provinces', seas: 'naming the seas',
pins: 'placing the pins', 'side-lanes': 'laying out the side lanes', cities: 'adding the cities',
names: 'placing the names', header: 'writing the header', print: 'opening the print dialog',
names: 'placing the names', header: 'writing the header', print: 'preparing the print',
}
const stepKey = (name) => name.replace(/-([a-z])/g, (m, c) => c.toUpperCase())
const nowMs = ref(Date.now())
@ -616,6 +616,8 @@ async function exportPoster(item) {
// (60in 96in), where an image of it would be shrunk onto letter. A download still rasterises, without them.
if (props.posterAction === 'print' && hasExternalImages(html)) { await printSheetDocument(html); return }
step('print')
// let the step paint before the raster starts: the SVG decode below holds the page while it draws
await new Promise((r) => (typeof requestAnimationFrame === 'function' ? requestAnimationFrame(() => setTimeout(r, 0)) : setTimeout(r, 0)))
const blob = await rasterPoster(html, { scale: 2 })
if (await looksRendered(blob)) { await deliverPoster(blob, item); return }
}

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"

View file

@ -106,7 +106,7 @@
"cities": "adding the cities",
"names": "placing the names",
"header": "writing the header",
"print": "opening the print dialog"
"print": "preparing the print"
},
"stepOf": "step {n} of {m}",
"elapsed": "{s} s"