squishjs 0.7.52 → 0.7.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/squish.js +3 -3
package/package.json
CHANGED
package/src/squish.js
CHANGED
|
@@ -131,9 +131,9 @@ const squish = (entity, scale = null) => {
|
|
|
131
131
|
|
|
132
132
|
// length + 5 bytes for what we're inserting here - 3 for length, one for type (3), one for class code
|
|
133
133
|
const totalLength = squished.length + 5;
|
|
134
|
-
const rightMost = Math.min(
|
|
135
|
-
const middle = Math.min(
|
|
136
|
-
const leftMost = Math.min(
|
|
134
|
+
const rightMost = Math.min(255, totalLength);
|
|
135
|
+
const middle = Math.min(255, Math.max(0, totalLength - 255));
|
|
136
|
+
const leftMost = Math.min(255, Math.max(0, totalLength - 510));
|
|
137
137
|
|
|
138
138
|
return [3, leftMost, middle, rightMost, nodeClassCode, ...squished];
|
|
139
139
|
|