Explain image style in testpage

This commit is contained in:
lilith 2025-02-14 01:13:19 +01:00
commit 2bda1f3e78
Signed by: lilith
SSH key fingerprint: SHA256:7kmBUkMCVUCN9z9MyGuBan8hifDCBaiG1RonGxdCB3A
2 changed files with 19 additions and 19 deletions

View file

@ -30,9 +30,9 @@ function loadImage(base64Image) {
let svgWidth = this.width;
let svgHeight = this.height;
if (this.width > 1000) {
svgWidth = 1000;
svgHeight = 1000 * this.height / this.width;
if (this.height > 1000) {
svgHeight = 1000;
svgWidth = 1000 * this.width / this.height;
}
svg.setAttribute("height", svgHeight);