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:
File diff suppressed because it is too large
Load Diff
@@ -495,7 +495,7 @@ function prefabLayers(prefab, input) {
|
||||
const shadow = style.shadowInfos?.find((item) => Number(item?.offset?.x ?? 0) !== 0 || Number(item?.offset?.y ?? 0) !== 0);
|
||||
const fontUuid = textMesh.m_font?.uuid?.uuid;
|
||||
layers.push({
|
||||
align: Number(style.alignment ?? 0) === 2 ? "right" : Number(style.alignment ?? 0) === 1 ? "left" : "center",
|
||||
align: Number(style.alignment ?? 0) === 2 ? "right" : Number(style.alignment ?? 0) === 1 ? "center" : "left",
|
||||
...(transform.alpha === 1 ? {} : { alpha: transform.alpha }),
|
||||
...(transform.anchorX === 0.5 ? {} : { anchor_x: transform.anchorX }),
|
||||
...(transform.anchorY === 0.5 ? {} : { anchor_y: 1 - transform.anchorY }),
|
||||
|
||||
@@ -98,6 +98,7 @@ describe("POSTV1-ASSET-ALL-16 complete asset catalog", () => {
|
||||
expect(byId.get("H005")!.render_model.text_layers[1]).toMatchObject({ anchor_y: 0 });
|
||||
expect(byId.get("H005")!.render_model.text_layers[0]).toMatchObject({ vertical_align: "middle" });
|
||||
expect(byId.get("H005")!.render_model.text_layers[1]).toMatchObject({ vertical_align: "top" });
|
||||
expect(byId.get("H004")!.render_model.text_layers[0]).toMatchObject({ align: "center" });
|
||||
|
||||
const heading016Text = byId.get("H016")!.render_model.text_layers;
|
||||
expect(heading016Text).toHaveLength(3);
|
||||
|
||||
Reference in New Issue
Block a user