@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.
Files changed (2) hide show
  1. package/dist/index.js +10 -5
  2. 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.526",
10666
+ version: "0.0.527",
10662
10667
  types: "dist/index.d.ts",
10663
10668
  main: "dist/index.js",
10664
10669
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.528",
4
+ "version": "0.0.529",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",