Comparing version 0.6.1 to 0.6.2
{ | ||
"name": "squishjs", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "squish & unsquish stuff", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -120,4 +120,4 @@ const InternalGameNode = require("./InternalGameNode"); | ||
squish: (t, scale) => { | ||
const textX = scale ? t.x * scale.x : t.x; | ||
const textY = scale ? t.y * scale.y : t.y; | ||
const textX = scale ? (t.x * scale.x) + Math.round(100 * (1 - scale.x)) / 2 : t.x; | ||
const textY = scale ? (t.y * scale.y) + Math.round(100 * (1 - scale.y)) / 2 : t.y; | ||
@@ -124,0 +124,0 @@ const align = t.align || 'left'; |
@@ -260,4 +260,4 @@ const { squish, unsquish } = require('../src/squish'); | ||
assert(unsquishedNode.text.x.toFixed(2) === (4 * xScale).toFixed(2)); | ||
assert(unsquishedNode.text.y.toFixed(2) === (20 * yScale).toFixed(2)); | ||
assert(unsquishedNode.text.x.toFixed(2) === (4 * xScale + Math.round((1 - xScale) * 100) / 2).toFixed(2)); | ||
assert(unsquishedNode.text.y.toFixed(2) === (20 * yScale + Math.round((1 - yScale) * 100) / 2).toFixed(2)); | ||
@@ -264,0 +264,0 @@ assert(unsquishedNode.text.size.toFixed(2) === scaledTextSize.toFixed(2)); |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
34945
16
1
12