@tscircuit/core 0.0.1397 → 0.0.1398

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 +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20944,7 +20944,6 @@ function applyNetLabelPlacements(args) {
20944
20944
  debug9(`processing placement: ${placement.netId}`);
20945
20945
  const placementUserNetId = globalConnMap.getIdsConnectedToNet(placement.globalConnNetId).find((id) => userNetIdToConnKey.get(id));
20946
20946
  const placementConnKey = userNetIdToConnKey.get(placementUserNetId);
20947
- const anchor_position = placement.anchorPoint;
20948
20947
  const orientation = placement.orientation;
20949
20948
  const anchor_side = oppositeSide(orientation);
20950
20949
  let sourceNet;
@@ -20954,6 +20953,13 @@ function applyNetLabelPlacements(args) {
20954
20953
  const schPortIds = placement.pinIds.map(
20955
20954
  (pinId) => pinIdToSchematicPortId.get(pinId)
20956
20955
  );
20956
+ let anchor_position = placement.anchorPoint;
20957
+ if (schPortIds.length === 1 && schPortIds[0]) {
20958
+ const anchorSchPort = db.schematic_port.get(schPortIds[0]);
20959
+ if (anchorSchPort?.center && !anchorSchPort.is_connected) {
20960
+ anchor_position = anchorSchPort.center;
20961
+ }
20962
+ }
20957
20963
  if (schPortIds.some(
20958
20964
  (schPortId) => schematicPortIdsWithPreExistingNetLabels.has(schPortId)
20959
20965
  )) {
@@ -25286,7 +25292,7 @@ import { identity as identity5 } from "transformation-matrix";
25286
25292
  var package_default = {
25287
25293
  name: "@tscircuit/core",
25288
25294
  type: "module",
25289
- version: "0.0.1396",
25295
+ version: "0.0.1397",
25290
25296
  types: "dist/index.d.ts",
25291
25297
  main: "dist/index.js",
25292
25298
  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.1397",
4
+ "version": "0.0.1398",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",