schematic-symbols 0.0.95 → 0.0.96

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "schematic-symbols",
3
3
  "main": "./dist/index.js",
4
- "version": "0.0.95",
4
+ "version": "0.0.96",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -6,8 +6,8 @@ const { paths, texts, bounds, refblocks } = svgJson
6
6
  export default defineSymbol({
7
7
  primitives: [
8
8
  ...Object.values(paths),
9
- { ...texts.bottom1, anchor: "middle_right" },
10
- { ...texts.top1, anchor: "middle_left" },
9
+ { ...texts.bottom1, anchor: "middle_top" },
10
+ { ...texts.top1, anchor: "middle_bottom" },
11
11
  ] as any,
12
12
  ports: [
13
13
  { ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
@@ -1,4 +1,14 @@
1
1
  import { rotateSymbol } from "drawing/rotateSymbol"
2
2
  import potentiometer2_horz from "./potentiometer2_horz"
3
3
 
4
- export default rotateSymbol(potentiometer2_horz)
4
+ const rotated = rotateSymbol(potentiometer2_horz)
5
+
6
+ const texts = rotated.primitives.filter((p) => p.type === "text")!
7
+
8
+ const val = texts.find((t) => t.text === "{VAL}")!
9
+ val.anchor = "middle_right"
10
+
11
+ const ref = texts.find((t) => t.text === "{REF}")!
12
+ ref.anchor = "middle_left"
13
+
14
+ export default rotated