schematic-symbols 0.0.95 → 0.0.96
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +155 -149
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/potentiometer2_horz.ts +2 -2
- package/symbols/potentiometer2_vert.ts +11 -1
package/package.json
CHANGED
@@ -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: "
|
10
|
-
{ ...texts.top1, anchor: "
|
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
|
-
|
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
|