Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type:'text' , 文本的对齐方式失效??? #34

Closed
Veepim opened this issue Sep 4, 2018 · 2 comments
Closed

type:'text' , 文本的对齐方式失效??? #34

Veepim opened this issue Sep 4, 2018 · 2 comments

Comments

@Veepim
Copy link

Veepim commented Sep 4, 2018

{ type: 'text', content: 'this is text', fontSize: 30, color: '#402D16', textAlign: 'center', top: 270, right: 0 },

我设置文案居中或者居右的时候没有效果,只有居左的时候可以显示

@hopkinson
Copy link

hopkinson commented Sep 5, 2018

@Veepim
textAlign:'right' + left: width(卡片宽度)

@kuckboy1994
Copy link
Owner

@Veepim textAlign 的实现就是按照最底层的api来的。你可以参看一下这个代码。
CanvasContext.setTextAlign(string align)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants