calculate-packing 0.0.74 → 0.0.75
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/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2854,7 +2854,7 @@ var PackSolver2 = class extends BaseSolver5 {
|
|
|
2854
2854
|
const packedComponent = {
|
|
2855
2855
|
...component,
|
|
2856
2856
|
center: component.center ?? { x: 0, y: 0 },
|
|
2857
|
-
ccwRotationOffset: component.ccwRotationOffset ?? 0,
|
|
2857
|
+
ccwRotationOffset: component.ccwRotationOffset ?? component.availableRotationDegrees?.[0] ?? 0,
|
|
2858
2858
|
pads: component.pads.map((pad) => ({
|
|
2859
2859
|
...pad,
|
|
2860
2860
|
absoluteCenter: pad.absoluteCenter ?? { x: 0, y: 0 }
|
|
@@ -2878,7 +2878,7 @@ var PackSolver2 = class extends BaseSolver5 {
|
|
|
2878
2878
|
const newPackedComponent = {
|
|
2879
2879
|
...firstComponentToPack,
|
|
2880
2880
|
center: initialPosition,
|
|
2881
|
-
ccwRotationOffset: 0,
|
|
2881
|
+
ccwRotationOffset: firstComponentToPack.ccwRotationOffset ?? firstComponentToPack.availableRotationDegrees?.[0] ?? 0,
|
|
2882
2882
|
pads: firstComponentToPack.pads.map((p) => ({
|
|
2883
2883
|
...p,
|
|
2884
2884
|
absoluteCenter: { x: 0, y: 0 }
|
|
@@ -2981,7 +2981,7 @@ var PackSolver2 = class extends BaseSolver5 {
|
|
|
2981
2981
|
const packedComponent = {
|
|
2982
2982
|
...this.componentToPack,
|
|
2983
2983
|
center: { x: 0, y: 0 },
|
|
2984
|
-
ccwRotationOffset: 0,
|
|
2984
|
+
ccwRotationOffset: this.componentToPack?.ccwRotationOffset ?? this.componentToPack?.availableRotationDegrees?.[0] ?? 0,
|
|
2985
2985
|
pads: this.componentToPack.pads.map((p) => ({
|
|
2986
2986
|
...p,
|
|
2987
2987
|
absoluteCenter: { x: 0, y: 0 }
|
package/package.json
CHANGED