This commit is contained in:
minom committed 2026-11-04 18:03:01 +08:00
1 parent 1cb2a7a35e
commit 8db6019ba3
10 files changed
+1120 -703

No files matched your search

+19 -6
View File
@@ -491,6 +491,8 @@
}
return { name: x.name, size: final_s, isMulti: x.isMulti, isShort: x.isShort };
});
let minFinalSize = Math.min(...sizes.map(item => item.size));
sizes.forEach(item => item.size = minFinalSize);
break;
}
@@ -605,7 +607,7 @@
"line-height": "1.1",
"text-align": alignStyle,
"text-align-last": alignStyle,
"margin-left": "5px",
//"margin-left": "5px",
"margin-top": spanMarginTop, // 🚀 套用動態外距
"text-justify": "inter-character",
"word-break": "break-all"
@@ -660,12 +662,18 @@
}
})
console.log("printSize", printSize)
let printid_size = "12px";
if (parseInt(printSize.height) > 297) {
printid_size = "16px";
} else if (parseInt(printSize.height) > 420) {
printid_size = "18px";
}
let content = $(`<div class="tablet-element print_id "></div>`)
.css({
position: "absolute", right: "0mm", top: "-1mm", fontSize: '12px',
position: "absolute", right: "0mm", top: "-1mm", fontSize: printid_size,
"z-index": 9999,
"align-items": "center"
})
.html(x.print_id);
tabletpaper.append(content);
@@ -1031,7 +1039,7 @@
else if (Number(el.height) < 500) shrinkLimit = 6;
let s = parseFloat(el.style ? el.style.fontSize : el.fontSize);
if (names.length == 2) h = th + v_gap;
//if (names.length == 2) h = th + v_gap;
// 🚀 關鍵修復:刪除了
// 確保 liveList 總高度永遠維持使用者設定的原始高度,不會異常縮小!
@@ -1042,6 +1050,9 @@
let l = name.length;
// 6個字以內,或換算後能塞入預設區塊的視為短名
let isShort = (l <= 6) || ((l * init_size_px) <= (th + (v_gap / 2)));
if (names.length == 2) {
isShort = false;
}
return { name: name, l: l, isShort: isShort, isMulti: false };
});
@@ -1533,11 +1544,13 @@
})
return g;
},
renderNormal(mid, d) {
renderNormal(mid, d) { // d.width
let self = this;
let txt = $(`<div class='${d.elementID}'>${mid==undefined?"":mid}</div>`).css({
"z-index": 9999, visibility: d.visibility,
width: d.width, height: d.height
display: "flex",
"align-items": "center",
width:d.width, height: d.height
});
return txt;
},