Add widget catalog and restore canvas preview tools

This commit is contained in:
tongtong committed 2026-11-26 08:36:21 +08:00
1 parent 12a8c24441
commit beeca041ef
13 files changed
+489 -35

No files matched your search

+4 -4
View File
@@ -361,11 +361,11 @@ const LIB = [
const DEVICES = [
{ name:'16 : 9', w:1080, h:1920 },
{ name:'16 : 8', w:1080, h:2160 },
{ name:'18 : 9', w:1080, h:2160 },
{ name:'19.5 : 9', w:1080, h:2340 },
{ name:'2K 20:9', w:1440, h:3120 },
{ name:'2K 20:9', w:1440, h:3200 },
{ name:'16:10', w:1440, h:2304 },
{ name:'平板 4:3', w:1600, h:2560 },
{ name:'平板 4:3', w:1536, h:2048 },
];
let state = newState();
@@ -692,7 +692,7 @@ function renderDevices() {
} else if (fit === 'elastic' && buildMapper({w:1080,h:2160}, items, fit, anchor).elastic) {
const mm = buildMapper({w:1080,h:2160}, items, 'elastic', anchor);
$('devSummary').innerHTML =
`弹性行距 · 纵向余量按原空白比例放大到行间距(16:8 上 ×${mm.elastic.k.toFixed(2)}),元素尺寸不变`;
`弹性行距 · 纵向余量按原空白比例放大到行间距(18:9 上 ×${mm.elastic.k.toFixed(2)}),元素尺寸不变`;
} else {
let vC = 0, hC = 0, mV = 0, mH = 0;
DEVICES.forEach(d => {