Skip to content

Commit 60f42b5

Browse files
committed
Raster stats: show unrounded CSS px dimensions
Drop .toFixed(0) so the CSS px values show their actual fractional size (e.g. 182.5 × 180.5 instead of 183 × 181), making direct comparison with the vector tab's viewBox easier. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2436400 commit 60f42b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ hb_blob_destroy (blob);`
832832
rasterCtx.putImageData (imageData, 0, 0);
833833
rasterStats.textContent =
834834
w + " × " + h + " px"
835-
+ " (" + (w / dpr).toFixed (0) + " × " + (h / dpr).toFixed (0) + " CSS px"
835+
+ " (" + (w / dpr) + " × " + (h / dpr) + " CSS px"
836836
+ " · " + dpr + "× DPR)";
837837
/* Re-encode the canvas as PNG for the download link.
838838
* toBlob is async; the previous URL is revoked once the

0 commit comments

Comments
 (0)