@tscircuit/core 0.0.528 → 0.0.529
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 +10 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8505,6 +8505,10 @@ var Board = class extends Group {
|
|
|
8505
8505
|
const { _parsedProps: props } = this;
|
|
8506
8506
|
let computedWidth = props.width ?? 0;
|
|
8507
8507
|
let computedHeight = props.height ?? 0;
|
|
8508
|
+
let center = {
|
|
8509
|
+
x: (props.pcbX ?? 0) + (props.outlineOffsetX ?? 0),
|
|
8510
|
+
y: (props.pcbY ?? 0) + (props.outlineOffsetY ?? 0)
|
|
8511
|
+
};
|
|
8508
8512
|
if (props.outline) {
|
|
8509
8513
|
const xValues = props.outline.map((point) => point.x);
|
|
8510
8514
|
const yValues = props.outline.map((point) => point.y);
|
|
@@ -8514,12 +8518,13 @@ var Board = class extends Group {
|
|
|
8514
8518
|
const maxY = Math.max(...yValues);
|
|
8515
8519
|
computedWidth = maxX - minX;
|
|
8516
8520
|
computedHeight = maxY - minY;
|
|
8521
|
+
center = {
|
|
8522
|
+
x: (minX + maxX) / 2 + (props.outlineOffsetX ?? 0),
|
|
8523
|
+
y: (minY + maxY) / 2 + (props.outlineOffsetY ?? 0)
|
|
8524
|
+
};
|
|
8517
8525
|
}
|
|
8518
8526
|
const pcb_board = db.pcb_board.insert({
|
|
8519
|
-
center
|
|
8520
|
-
x: (props.pcbX ?? 0) + (props.outlineOffsetX ?? 0),
|
|
8521
|
-
y: (props.pcbY ?? 0) + (props.outlineOffsetY ?? 0)
|
|
8522
|
-
},
|
|
8527
|
+
center,
|
|
8523
8528
|
thickness: this.boardThickness,
|
|
8524
8529
|
num_layers: this.allLayers.length,
|
|
8525
8530
|
width: computedWidth,
|
|
@@ -10658,7 +10663,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
10658
10663
|
var package_default = {
|
|
10659
10664
|
name: "@tscircuit/core",
|
|
10660
10665
|
type: "module",
|
|
10661
|
-
version: "0.0.
|
|
10666
|
+
version: "0.0.527",
|
|
10662
10667
|
types: "dist/index.d.ts",
|
|
10663
10668
|
main: "dist/index.js",
|
|
10664
10669
|
module: "dist/index.js",
|