增加 textAlign 属性
This commit is contained in:
parent
19b85f12c7
commit
626cfde7ec
@ -413,9 +413,9 @@ export default class Painter {
|
|||||||
text += '...';
|
text += '...';
|
||||||
measuredWith = this.ctx.measureText(text).width;
|
measuredWith = this.ctx.measureText(text).width;
|
||||||
}
|
}
|
||||||
this.ctx.setTextAlign(view.css.align ? view.css.align : 'left');
|
this.ctx.setTextAlign(view.css.textAlign ? view.css.textAlign : 'left');
|
||||||
let x;
|
let x;
|
||||||
switch (view.css.align) {
|
switch (view.css.textAlign) {
|
||||||
case 'center':
|
case 'center':
|
||||||
x = 0;
|
x = 0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user