Files
repo-vis/web
麻薯 b58ba41458
Some checks failed
Deploy to OCI / deploy (push) Failing after 40s
fix: cap watermark dimensions to prevent RangeError on large files
buildWatermark() calls Array.join() on a lines array whose size is
derived from tile dimensions divided by wmFontSize. For files with very
many lines the codeFontSize (and thus wmFontSize) approaches zero,
making charsPerLine and lineCount astronomically large and blowing past
JS's string length limit.

Fix by:
1. Clamping wmFontSize to a minimum of 1.0 to handle pathologically
   large files.
2. Capping charsPerLine at 400 and lineCount at 150 — the watermark is
   purely decorative so this cap has no visible impact.
2026-04-07 10:56:02 +01:00
..