MCPcopy Create free account
hub / github.com/cocos/cocos-engine / strToHAlign

Function strToHAlign

cocos/tiledmap/tmx-xml-parser.ts:47–57  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

45}
46
47function strToHAlign (value): HorizontalTextAlignment {
48 const hAlign = Label.HorizontalAlign;
49 switch (value) {
50 case 'center':
51 return hAlign.CENTER;
52 case 'right':
53 return hAlign.RIGHT;
54 default:
55 return hAlign.LEFT;
56 }
57}
58
59function strToVAlign (value): VerticalTextAlignment {
60 const vAlign = Label.VerticalAlign;

Callers 1

_parseObjectGroupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected