Skip to content

Commit

Permalink
Merge pull request #80 from jiakuan/master
Browse files Browse the repository at this point in the history
Minor improvement to reduce function call
  • Loading branch information
geongeorge authored Feb 22, 2023
2 parents a4af5c3 + ce0d244 commit a1718e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/canvas-txt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const canvasTxt = {
while (textpixlen < linelen) {
textlen++
texttoprint = temptext.substr(0, textlen)
textpixlen = ctx.measureText(temptext.substr(0, textlen)).width
textpixlen = ctx.measureText(texttoprint).width
}
// Remove last character that was out of the box
textlen--
Expand Down

1 comment on commit a1718e3

@vercel
Copy link

@vercel vercel bot commented on a1718e3 Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.