calculate-size
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -5,2 +5,3 @@ export interface OptionalOptions { | ||
fontWeight?: string; | ||
width?: string; | ||
} | ||
@@ -7,0 +8,0 @@ export interface Size { |
@@ -21,3 +21,3 @@ (function (dependencies, factory) { | ||
element.style.top = '-999px'; | ||
element.style.width = 'auto'; | ||
element.style.width = options.width; | ||
element.style.height = 'auto'; | ||
@@ -41,2 +41,3 @@ document.body.appendChild(element); | ||
options.fontWeight = options.fontWeight || 'normal'; | ||
options.width = options.width || 'auto'; | ||
var element = createDummyElement(text, options); | ||
@@ -43,0 +44,0 @@ var size = { |
{ | ||
"name": "calculate-size", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Calculate the pixel size of a string", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
6597
62
0