牌位版面調整

This commit is contained in:
2026-07-12 21:22:38 +08:00
parent 2686506f9c
commit d71cc605dc
8 changed files with 864 additions and 37 deletions
+27 -14
View File
@@ -235,6 +235,14 @@
</div>
</div>
</div>
<div class="row">
<div class="col-6">
<div class="form-floating mb-3">
<input type="number" id="textSpan" class="form-control form-control-sm mb-2">
<label class="small" for="textSpan">文字間距</label>
</div>
</div>
</div>
</div>
</div>
@@ -605,7 +613,8 @@
textWidth: el.textWidth,
textHeight: el.textHeight,
breakLen: el.breakLen,
backendInp: el.backendImg
backendInp: el.backendImg,
textSpan:el.textSpan
};
obj.push(config)
@@ -751,6 +760,7 @@
$('#height').on('input', (e) => this.updateActive('height', $(e.target).val()))
$('#textWidth').on('input', (e) => this.updateActive('textWidth', $(e.target).val()))
$('#textHeight').on('input', (e) => this.updateActive('textHeight', $(e.target).val()))
$('#textSpan').on('input', (e) => this.updateActive('textSpan', $(e.target).val()))
$(document).on('mousedown', '.tablet-element', (e) => {
e.stopPropagation();
this.select($(e.currentTarget).attr('id'));
@@ -852,11 +862,12 @@
border: "0px solid #ccc",
padding: "1px",
"font-family": el.fontFamily,
"letter-spacing": "0.1em",
"column-gap": "1px",
"row-gap": "1px",
//"letter-spacing": `${el.textSpan}px`,
"column-gap": `${el.textSpan}px`,
"align-items": "center",
});
//
//"row-gap": "1px",
let self = this;
names.forEach(n => {
$namelist.append(self.renderNameSpan(n, el))
@@ -871,10 +882,10 @@
width: `${el.textWidth}px`,
"text-align": "justify",
"text-align-last": "justify",
"margin-bottom": "40px",
"margin-left": "5px",
"text-justify": "inter-character",
});
});// "margin-bottom": `${el.textSpan}px`,
},
renderLiveList(names, el) {
console.log("renderLiveList:",names);
@@ -890,11 +901,12 @@
border: "0px solid #ccc",
padding: "1px",
"font-family": "BiauKai",
"letter-spacing": "0.1em",
"column-gap": "1px",
"row-gap": "1px",
//"letter-spacing": `${el.textSpan}px`,
"column-gap": `${el.textSpan}px`,
"align-items": "center",
});
// "column-gap": `${el.textSpan}px`,
//"row-gap": "1px",
let self = this;
names.forEach(n => {
$namelist.append(self.renderLiveSpan(n, el))
@@ -911,10 +923,10 @@
width: `${el.textWidth}px`,
"text-align": "justify",
"text-align-last": "justify",
"margin-bottom": "15px",
"margin-left": "5px",
"text-justify": "inter-character",
});
});//"margin-bottom": `${el.textSpan}px`,
},
// 品字佈局邏輯:一上二下
renderRoster(names, el) {
@@ -933,7 +945,7 @@
"flex-direction": "row", /* 上下分層 (Top / Bottom) */
"align-items": "center", /* 左右置中對齊 */
"justify-content": "start",
gap: "20px",
gap: `${el.textSpan}px`,
});
h.append(this.renderNameGroups(top,el));
if (bot.length) h.append(this.renderNameGroups(bot,el));
@@ -947,7 +959,7 @@
"height": el.textHeight,
})
items.forEach(x => {
g.append($(`<div class="" style="font-size:${el.style.fontSize}pt;letter-spacing: 10px;">${x}</div>`))
g.append($(`<div class="" style="font-size:${el.style.fontSize}pt;letter-spacing: 10px;text-align: justify; text-align-last: justify;">${x}</div>`))
})
return g;
},
@@ -996,6 +1008,7 @@
$("#height").val(el.height);
$("#textWidth").val(el.textWidth);
$("#textHeight").val(el.textHeight);
$("#textSpan").val(el.textSpan);
//this.render();
},
@@ -1160,7 +1173,7 @@
detail.push({
elementID: el.id, startX: el.x.toString(), startY: el.y.toString(), fontSize: el.style.fontSize, fontFamily: el.style.fontFamily,
breakLen: el.breakLen, twoOffset: el.twoOffset, threeOffset: el.threeOffset, fourOffset: el.fourOffset,
isActive: el.style.visibility, width: el.width, height: el.height, textWidth: el.textWidth, textHeight: el.textHeight
isActive: el.style.visibility, width: el.width, height: el.height, textWidth: el.textWidth, textHeight: el.textHeight,textSpan:el.textSpan
});
});
let sID = this.styleID