From b9d78e89265689c13f2cd0a10696a61faa3526d3 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Mon, 28 Sep 2026 17:26:47 +0000 Subject: [PATCH] The paper turns to match the map, because a map is wider than it is tall Follow-up on DRV1650-SR-POSTER-EXPORT: the print came out vertical, where a horizontal map fits the shape better. The export asked for 8.5x11 portrait unconditionally, so a landscape map was letterboxed onto a tall sheet -- white above and below, the map small in the middle. That was the other half of the wrong vertical aspect; the first half was the tile slicing, fixed in 859bb268. Orientation now follows the map: landscape when the map's own container is wider than it is tall, portrait otherwise. The PAPER is unchanged -- still 8.5x11 stock, only turned -- so the sheet stays a size printers have rather than becoming a custom one. Measured from map.getContainer() rather than from the window, because the map may be one pane of a composite and it is the MAP's shape being exported, not the browser's. --- plugin-designs/doxa-research-map/research-map.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugin-designs/doxa-research-map/research-map.vue b/plugin-designs/doxa-research-map/research-map.vue index 4adf05385..a082897aa 100644 --- a/plugin-designs/doxa-research-map/research-map.vue +++ b/plugin-designs/doxa-research-map/research-map.vue @@ -1407,7 +1407,20 @@ async function openPoster() { import('@map/composables/printInPlace.js'), ]) const exporter = useMapPoster(() => map.value) - const spec = defaultPosterSpec({ widthIn: 8.5, heightIn: 11, dpi: 200, orientation: 'portrait' }) + // ★ THE PAPER FOLLOWS THE MAP, because a map is usually wider than it is tall and a portrait sheet + // letterboxes it (Driver, 2026-09-28: the print came out vertical and it should "probably [be] a + // horizontal map"). Same 8.5x11 stock either way — only the ORIENTATION turns, so the sheet is + // still a standard page and not a custom size no printer has. + // Measured from the map's own container rather than from the window: the map may be one pane of a + // composite, and it is the MAP's shape being exported, not the browser's. + const mapEl = map.value?.getContainer?.() || null + const landscape = !!mapEl && mapEl.clientWidth > mapEl.clientHeight + const spec = defaultPosterSpec({ + widthIn: landscape ? 11 : 8.5, + heightIn: landscape ? 8.5 : 11, + dpi: 200, + orientation: landscape ? 'landscape' : 'portrait', + }) // The poster is titled by the VIEW on screen ("Prayer", "Religion"…), in the reader's language. // The legend's title bar is the fallback only: on a flat tab it is the generic word "Legend". const title = tabLabel(activeTab.value) || legendTitle.value || 'Doxa Map'