text-ellipsis-core
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "text-ellipsis-core", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "the core of text-ellipsis.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -29,3 +29,3 @@ // const getLengthByCanvas = (ctx, font = {}) => { | ||
// console.log(str, len); | ||
if (len <= parseInt(font.width, 10)) { | ||
if (len <= parseFloat(font.width, 10)) { | ||
line[beginLine - 1] = str; | ||
@@ -32,0 +32,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12082