fix(POSTV1-TEMPLATE-LAYOUT-19): 按原始文本框修复模板偏移
Dada P0-A isolated Windows CI / validate-and-package (push) Waiting to run
Dada P0-A isolated Windows CI / validate-and-package (push) Waiting to run
This commit is contained in:
@@ -518,6 +518,9 @@ function prefabLayers(prefab, input) {
|
||||
stroke_width: Math.max(0, Number(outline?.outlineSize ?? 0)),
|
||||
text: String(textMesh.m_text ?? ""),
|
||||
type: "text",
|
||||
vertical_align: Number(style.vAlignment ?? 1) === 0 ? "top"
|
||||
: Number(style.vAlignment ?? 1) === 2 ? "bottom"
|
||||
: "middle",
|
||||
width: Math.max(1, Number(object.m_contentSize?.width ?? 1) * Math.abs(scaleX)),
|
||||
x: transform.x,
|
||||
y: -transform.y,
|
||||
@@ -762,6 +765,7 @@ export function compileTextTemplateAssets({ templateDirectory, templateId }) {
|
||||
stroke_width: 0,
|
||||
text: value,
|
||||
type: "text",
|
||||
vertical_align: "middle",
|
||||
width: Math.max(96, Array.from(value).length * 52),
|
||||
x: 0,
|
||||
y: 0,
|
||||
|
||||
Reference in New Issue
Block a user