Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(inline string space dont recognize): fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
DR-Univer committed Sep 24, 2020
1 parent 67ddee3 commit ddc5c5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/global/getRowlen.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ function getMeasureText(value, ctx, fontset){
}

let measureText = ctx.measureText(value), cache = {};
if(measureText.actualBoundingBoxRight==null){
var regu = "^[ ]+$";
var re = new RegExp(regu);
if(measureText.actualBoundingBoxRight==null || re.test(value)){
cache.width = measureText.width;
}
else{
Expand Down

0 comments on commit ddc5c5d

Please sign in to comment.