|
@@ -299,7 +299,7 @@ export default class Draw {
|
|
|
const fontWidth = this.context.measureText(geometry.value).width
|
|
|
|
|
|
//let rowCount = Math.ceil(geometry.height/defaultHeight) //分几行写
|
|
|
- let rowCount = Math.ceil(fontWidth/defaultWidth) //分几行写,根据要写的文字的长度来判断
|
|
|
+ let rowCount = Math.ceil(fontWidth/geometry.width) //分几行写,根据要写的文字的长度来判断
|
|
|
|
|
|
if(rowCount == 1){
|
|
|
this.context.textAlign = "center";
|