@tscircuit/core 0.0.589 → 0.0.590
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 +11 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7826,7 +7826,7 @@ function Group_doInitialSchematicLayoutGrid(group) {
|
|
|
7826
7826
|
if (props.schLayout?.grid) {
|
|
7827
7827
|
gridColsOption = props.schLayout.grid.cols ?? gridColsOption;
|
|
7828
7828
|
gridRowsOption = props.schLayout.grid.rows;
|
|
7829
|
-
gridGapOption = props.schLayout.
|
|
7829
|
+
gridGapOption = props.schLayout.gridGap ?? gridGapOption;
|
|
7830
7830
|
}
|
|
7831
7831
|
let numCols;
|
|
7832
7832
|
let numRows;
|
|
@@ -7939,10 +7939,15 @@ function Group_doInitialPcbLayoutGrid(group) {
|
|
|
7939
7939
|
let maxCellHeight = 0;
|
|
7940
7940
|
for (const child of pcbChildren) {
|
|
7941
7941
|
const pcbComp = db.pcb_component.get(child.pcb_component_id);
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7942
|
+
let width = pcbComp?.width ?? 0;
|
|
7943
|
+
let height = pcbComp?.height ?? 0;
|
|
7944
|
+
if (width === 0 || height === 0) {
|
|
7945
|
+
const bounds = getBoundsOfPcbComponents(child.children);
|
|
7946
|
+
width = Math.max(width, bounds.width);
|
|
7947
|
+
height = Math.max(height, bounds.height);
|
|
7945
7948
|
}
|
|
7949
|
+
maxCellWidth = Math.max(maxCellWidth, width);
|
|
7950
|
+
maxCellHeight = Math.max(maxCellHeight, height);
|
|
7946
7951
|
}
|
|
7947
7952
|
if (maxCellWidth === 0 && pcbChildren.length > 0) maxCellWidth = 1;
|
|
7948
7953
|
if (maxCellHeight === 0 && pcbChildren.length > 0) maxCellHeight = 1;
|
|
@@ -7952,7 +7957,7 @@ function Group_doInitialPcbLayoutGrid(group) {
|
|
|
7952
7957
|
if (props.pcbLayout?.grid) {
|
|
7953
7958
|
gridColsOption = props.pcbLayout.grid.cols ?? gridColsOption;
|
|
7954
7959
|
gridRowsOption = props.pcbLayout.grid.rows;
|
|
7955
|
-
gridGapOption = props.pcbLayout.
|
|
7960
|
+
gridGapOption = props.pcbLayout.gridGap ?? gridGapOption;
|
|
7956
7961
|
}
|
|
7957
7962
|
let numCols;
|
|
7958
7963
|
let numRows;
|
|
@@ -11195,7 +11200,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
11195
11200
|
var package_default = {
|
|
11196
11201
|
name: "@tscircuit/core",
|
|
11197
11202
|
type: "module",
|
|
11198
|
-
version: "0.0.
|
|
11203
|
+
version: "0.0.589",
|
|
11199
11204
|
types: "dist/index.d.ts",
|
|
11200
11205
|
main: "dist/index.js",
|
|
11201
11206
|
module: "dist/index.js",
|