@tscircuit/core 0.0.465 → 0.0.466
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 +18 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4847,10 +4847,6 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
4847
4847
|
return;
|
|
4848
4848
|
}
|
|
4849
4849
|
}
|
|
4850
|
-
if (this.props.schDisplayLabel && ("from" in this.props && "to" in this.props || "path" in this.props)) {
|
|
4851
|
-
this._doInitialSchematicTraceRenderWithDisplayLabel();
|
|
4852
|
-
return;
|
|
4853
|
-
}
|
|
4854
4850
|
const connection = {
|
|
4855
4851
|
name: this.source_trace_id,
|
|
4856
4852
|
pointsToConnect: []
|
|
@@ -4863,6 +4859,23 @@ searched component ${targetComponent.getString()}, which has ports: ${targetComp
|
|
|
4863
4859
|
facingDirection: port.facingDirection
|
|
4864
4860
|
}));
|
|
4865
4861
|
const isPortAndNetConnection = portsWithPosition.length === 1 && netsWithSelectors.length === 1;
|
|
4862
|
+
if (this.props.schDisplayLabel) {
|
|
4863
|
+
if (isPortAndNetConnection) {
|
|
4864
|
+
const net = netsWithSelectors[0].net;
|
|
4865
|
+
const { port, position: anchorPos } = portsWithPosition[0];
|
|
4866
|
+
db.schematic_net_label.insert({
|
|
4867
|
+
text: this.props.schDisplayLabel,
|
|
4868
|
+
source_net_id: net.source_net_id,
|
|
4869
|
+
anchor_position: anchorPos,
|
|
4870
|
+
center: anchorPos,
|
|
4871
|
+
anchor_side: getEnteringEdgeFromDirection(port.facingDirection) ?? "bottom"
|
|
4872
|
+
});
|
|
4873
|
+
return;
|
|
4874
|
+
} else if ("from" in this.props && "to" in this.props || "path" in this.props) {
|
|
4875
|
+
this._doInitialSchematicTraceRenderWithDisplayLabel();
|
|
4876
|
+
return;
|
|
4877
|
+
}
|
|
4878
|
+
}
|
|
4866
4879
|
if (isPortAndNetConnection) {
|
|
4867
4880
|
const net = netsWithSelectors[0].net;
|
|
4868
4881
|
const { port, position: anchorPos } = portsWithPosition[0];
|
|
@@ -9783,7 +9796,7 @@ import { identity as identity4 } from "transformation-matrix";
|
|
|
9783
9796
|
var package_default = {
|
|
9784
9797
|
name: "@tscircuit/core",
|
|
9785
9798
|
type: "module",
|
|
9786
|
-
version: "0.0.
|
|
9799
|
+
version: "0.0.465",
|
|
9787
9800
|
types: "dist/index.d.ts",
|
|
9788
9801
|
main: "dist/index.js",
|
|
9789
9802
|
module: "dist/index.js",
|