schematic-symbols 0.0.120 → 0.0.121
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +25 -5
- package/dist/index.js +1658 -704
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/dpdt_normally_closed_switch_down.ts +22 -0
- package/symbols/dpdt_normally_closed_switch_left.ts +23 -0
- package/symbols/dpdt_normally_closed_switch_right.ts +13 -0
- package/symbols/dpdt_normally_closed_switch_up.ts +22 -0
- package/symbols/dpdt_switch_down.ts +22 -0
- package/symbols/dpdt_switch_left.ts +23 -0
- package/symbols/dpdt_switch_right.ts +13 -0
- package/symbols/dpdt_switch_up.ts +22 -0
- package/symbols/dpst_normally_closed_switch_down.ts +22 -0
- package/symbols/dpst_normally_closed_switch_left.ts +23 -0
- package/symbols/dpst_normally_closed_switch_right.ts +11 -0
- package/symbols/dpst_normally_closed_switch_up.ts +22 -0
- package/symbols/dpst_switch_down.ts +21 -0
- package/symbols/dpst_switch_left.ts +23 -0
- package/symbols/dpst_switch_right.ts +11 -0
- package/symbols/dpst_switch_up.ts +22 -0
- package/symbols/spdt_normally_closed_switch_down.ts +22 -0
- package/symbols/spdt_normally_closed_switch_left.ts +22 -0
- package/symbols/spdt_normally_closed_switch_right.ts +10 -0
- package/symbols/spdt_normally_closed_switch_up.ts +22 -0
- package/symbols/spst_normally_closed_switch_down.ts +22 -0
- package/symbols/spst_normally_closed_switch_left.ts +22 -0
- package/symbols/spst_normally_closed_switch_right.ts +12 -0
- package/symbols/spst_normally_closed_switch_up.ts +22 -0
- package/symbols/dpdt_switch_horz.ts +0 -26
- package/symbols/dpdt_switch_vert.ts +0 -20
- package/symbols/dpst_switch_horz.ts +0 -23
- package/symbols/dpst_switch_vert.ts +0 -20
package/package.json
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpdt_normally_closed_switch_right from "./dpdt_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpdt_normally_closed_switch_right, "down")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0
|
18
|
+
ref.y += 0.537
|
19
|
+
val.y -= 0.5375
|
20
|
+
val.x = 0
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpdt_normally_closed_switch_right from "./dpdt_normally_closed_switch_right"
|
3
|
+
|
4
|
+
import type { TextPrimitive } from "drawing"
|
5
|
+
|
6
|
+
const rotated = rotateSymbol(dpdt_normally_closed_switch_right, "left")
|
7
|
+
|
8
|
+
const ref = rotated.primitives.find(
|
9
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
10
|
+
)! as TextPrimitive
|
11
|
+
const val = rotated.primitives.find(
|
12
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
13
|
+
)! as TextPrimitive
|
14
|
+
|
15
|
+
ref.anchor = "middle_bottom"
|
16
|
+
val.anchor = "middle_top"
|
17
|
+
|
18
|
+
ref.x = 0
|
19
|
+
ref.y += 1.0
|
20
|
+
val.y -= 1.0
|
21
|
+
val.x = 0
|
22
|
+
|
23
|
+
export default rotated
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import svgJson from "assets/generated/dpdt_normally_closed_switch.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
|
+
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.labelPort("left1", ["1"])
|
6
|
+
.labelPort("right1", ["3"])
|
7
|
+
.labelPort("right2", ["2"])
|
8
|
+
.labelPort("right3", ["6"])
|
9
|
+
.labelPort("left2", ["4"])
|
10
|
+
.labelPort("right5", ["5"])
|
11
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
12
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
13
|
+
.build()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpdt_normally_closed_switch_right from "./dpdt_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpdt_normally_closed_switch_right, "up")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0
|
18
|
+
ref.y += 0.537
|
19
|
+
val.y -= 0.5375
|
20
|
+
val.x = 0
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpdt_switch_right from "./dpdt_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpdt_switch_right, "down")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.0
|
18
|
+
ref.y += 0.565
|
19
|
+
val.y -= 0.555
|
20
|
+
val.x = 0.0
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpdt_switch_right from "./dpdt_switch_right"
|
3
|
+
|
4
|
+
import type { TextPrimitive } from "drawing"
|
5
|
+
|
6
|
+
const rotated = rotateSymbol(dpdt_switch_right, "left")
|
7
|
+
|
8
|
+
const ref = rotated.primitives.find(
|
9
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
10
|
+
)! as TextPrimitive
|
11
|
+
const val = rotated.primitives.find(
|
12
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
13
|
+
)! as TextPrimitive
|
14
|
+
|
15
|
+
ref.anchor = "middle_bottom"
|
16
|
+
val.anchor = "middle_top"
|
17
|
+
|
18
|
+
ref.x = 0
|
19
|
+
ref.y += 1.09
|
20
|
+
val.y -= 1.09
|
21
|
+
val.x = 0
|
22
|
+
|
23
|
+
export default rotated
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import svgJson from "assets/generated/dpdt_switch.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
|
+
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.labelPort("left1", ["1"])
|
6
|
+
.labelPort("right1", ["3"])
|
7
|
+
.labelPort("right2", ["2"])
|
8
|
+
.labelPort("right3", ["6"])
|
9
|
+
.labelPort("left2", ["4"])
|
10
|
+
.labelPort("right5", ["5"])
|
11
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
12
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
13
|
+
.build()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpdt_switch_right from "./dpdt_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpdt_switch_right, "up")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.0
|
18
|
+
ref.y += 0.565
|
19
|
+
val.y -= 0.555
|
20
|
+
val.x = 0.0
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpst_normally_closed_switch_right from "./dpst_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpst_normally_closed_switch_right, "down")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.4
|
18
|
+
ref.y += 0.265
|
19
|
+
val.y -= 0.265
|
20
|
+
val.x = 0.4
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpst_normally_closed_switch_right from "./dpst_normally_closed_switch_right"
|
3
|
+
|
4
|
+
import type { TextPrimitive } from "drawing"
|
5
|
+
|
6
|
+
const rotated = rotateSymbol(dpst_normally_closed_switch_right, "left")
|
7
|
+
|
8
|
+
const ref = rotated.primitives.find(
|
9
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
10
|
+
)! as TextPrimitive
|
11
|
+
const val = rotated.primitives.find(
|
12
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
13
|
+
)! as TextPrimitive
|
14
|
+
|
15
|
+
ref.anchor = "middle_bottom"
|
16
|
+
val.anchor = "middle_top"
|
17
|
+
|
18
|
+
ref.x = 0
|
19
|
+
ref.y += 0.67
|
20
|
+
val.y -= 0.67
|
21
|
+
val.x = 0
|
22
|
+
|
23
|
+
export default rotated
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import svgJson from "assets/generated/dpst_normally_closed_switch.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
|
+
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.labelPort("left1", ["1"])
|
6
|
+
.labelPort("right1", ["2"])
|
7
|
+
.labelPort("right3", ["4"])
|
8
|
+
.labelPort("left3", ["3"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
10
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
11
|
+
.build()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpst_normally_closed_switch_right from "./dpst_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpst_normally_closed_switch_right, "up")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.46
|
18
|
+
ref.y += 0.265
|
19
|
+
val.y -= 0.265
|
20
|
+
val.x = 0.46
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpst_switch_right from "./dpst_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpst_switch_right, "down")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.4
|
18
|
+
ref.y += 0.295
|
19
|
+
val.y -= 0.295
|
20
|
+
val.x = 0.42
|
21
|
+
export default rotated
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpst_switch_right from "./dpst_switch_right"
|
3
|
+
|
4
|
+
import type { TextPrimitive } from "drawing"
|
5
|
+
|
6
|
+
const rotated = rotateSymbol(dpst_switch_right, "left")
|
7
|
+
|
8
|
+
const ref = rotated.primitives.find(
|
9
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
10
|
+
)! as TextPrimitive
|
11
|
+
const val = rotated.primitives.find(
|
12
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
13
|
+
)! as TextPrimitive
|
14
|
+
|
15
|
+
ref.anchor = "middle_bottom"
|
16
|
+
val.anchor = "middle_top"
|
17
|
+
|
18
|
+
ref.x = 0
|
19
|
+
ref.y += 0.795
|
20
|
+
val.y -= 0.795
|
21
|
+
val.x = 0
|
22
|
+
|
23
|
+
export default rotated
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import svgJson from "assets/generated/dpst_switch.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
|
+
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.labelPort("left1", ["1"])
|
6
|
+
.labelPort("right1", ["2"])
|
7
|
+
.labelPort("right3", ["4"])
|
8
|
+
.labelPort("left3", ["3"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
10
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
11
|
+
.build()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import dpst_switch_right from "./dpst_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(dpst_switch_right, "up")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.46
|
18
|
+
ref.y += 0.315
|
19
|
+
val.y -= 0.315
|
20
|
+
val.x = 0.46
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import spdt_normally_closed_switch_right from "./spdt_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(spdt_normally_closed_switch_right, "down")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.44
|
18
|
+
ref.y += 0.28
|
19
|
+
val.y -= 0.28
|
20
|
+
val.x = 0.44
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import spdt_normally_closed_switch_right from "./spdt_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(spdt_normally_closed_switch_right, "left")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0
|
18
|
+
ref.y += 0.625
|
19
|
+
val.y -= 0.695
|
20
|
+
val.x = 0
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import svgJson from "assets/generated/spdt_normally_closed_switch.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
|
+
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
6
|
+
.labelPort("left1", ["1"])
|
7
|
+
.labelPort("right2", ["2"])
|
8
|
+
.labelPort("right1", ["3"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
10
|
+
.build()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import spdt_normally_closed_switch_right from "./spdt_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(spdt_normally_closed_switch_right, "up")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.4
|
18
|
+
ref.y += 0.28
|
19
|
+
val.y -= 0.28
|
20
|
+
val.x = 0.4
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import spst_normally_closed_switch_right from "./spst_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(spst_normally_closed_switch_right, "down")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.3
|
18
|
+
ref.y += 0.265
|
19
|
+
val.y -= 0.265
|
20
|
+
val.x = 0.3
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import spst_normally_closed_switch_right from "./spst_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(spst_normally_closed_switch_right, "left")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0
|
18
|
+
ref.y += 0.57
|
19
|
+
val.y -= 0.57
|
20
|
+
val.x = 0
|
21
|
+
|
22
|
+
export default rotated
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import svgJson from "assets/generated/spst_normally_closed_switch.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
|
+
|
4
|
+
delete (svgJson.refblocks as any).left1
|
5
|
+
delete (svgJson.refblocks as any).right1
|
6
|
+
svgJson.bounds.width += 0.2
|
7
|
+
export default modifySymbol(svgJson)
|
8
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
9
|
+
.labelPort("left2", ["1"])
|
10
|
+
.labelPort("right2", ["2"])
|
11
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
12
|
+
.build()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import spst_normally_closed_switch_right from "./spst_normally_closed_switch_right"
|
3
|
+
import type { TextPrimitive } from "drawing"
|
4
|
+
|
5
|
+
const rotated = rotateSymbol(spst_normally_closed_switch_right, "up")
|
6
|
+
|
7
|
+
const ref = rotated.primitives.find(
|
8
|
+
(p) => p.type === "text" && p.text === "{REF}",
|
9
|
+
)! as TextPrimitive
|
10
|
+
const val = rotated.primitives.find(
|
11
|
+
(p) => p.type === "text" && p.text === "{VAL}",
|
12
|
+
)! as TextPrimitive
|
13
|
+
|
14
|
+
ref.anchor = "middle_bottom"
|
15
|
+
val.anchor = "middle_top"
|
16
|
+
|
17
|
+
ref.x = 0.3
|
18
|
+
ref.y += 0.265
|
19
|
+
val.y -= 0.265
|
20
|
+
val.x = 0.3
|
21
|
+
|
22
|
+
export default rotated
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
|
-
import svgJson from "assets/generated/dpdt_switch.json"
|
3
|
-
import { Primitive } from "drawing/types"
|
4
|
-
|
5
|
-
const { paths, texts, bounds, refblocks, circles } = svgJson
|
6
|
-
|
7
|
-
export default defineSymbol({
|
8
|
-
primitives: [
|
9
|
-
...Object.values(paths),
|
10
|
-
...Object.values(circles),
|
11
|
-
{ ...texts.top1, anchor: "middle_bottom" },
|
12
|
-
{ ...texts.bottom1, anchor: "middle_top" },
|
13
|
-
] as Primitive[],
|
14
|
-
|
15
|
-
ports: [
|
16
|
-
{ ...refblocks.left1, labels: ["1"] },
|
17
|
-
{ ...refblocks.left2, labels: ["4"] },
|
18
|
-
{ ...refblocks.right1, labels: ["3"] },
|
19
|
-
{ ...refblocks.right2, labels: ["2"] },
|
20
|
-
{ ...refblocks.right3, labels: ["6"] },
|
21
|
-
{ ...refblocks.right5, labels: ["5"] },
|
22
|
-
],
|
23
|
-
|
24
|
-
size: { width: bounds.width, height: bounds.height },
|
25
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
26
|
-
})
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
-
import dpdp_switch_horz from "./dpdt_switch_horz"
|
3
|
-
|
4
|
-
const rotatedSymbol = rotateSymbol(dpdp_switch_horz)
|
5
|
-
|
6
|
-
const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")!
|
7
|
-
|
8
|
-
const val = texts.find((t) => t.text === "{VAL}")!
|
9
|
-
|
10
|
-
val.anchor = "middle_right"
|
11
|
-
val.x = -0.37
|
12
|
-
val.y = 0.12
|
13
|
-
|
14
|
-
const ref = texts.find((t) => t.text === "{REF}")!
|
15
|
-
|
16
|
-
ref.anchor = "middle_left"
|
17
|
-
ref.x = 0.37
|
18
|
-
ref.y = 0.12
|
19
|
-
|
20
|
-
export default rotatedSymbol
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
|
-
import svgJson from "assets/generated/dpst_switch.json"
|
3
|
-
import { Primitive } from "drawing/types"
|
4
|
-
|
5
|
-
svgJson.bounds.width += 0.2
|
6
|
-
const { paths, texts, bounds, refblocks, circles } = svgJson
|
7
|
-
|
8
|
-
export default defineSymbol({
|
9
|
-
primitives: [
|
10
|
-
...Object.values(paths),
|
11
|
-
...Object.values(circles),
|
12
|
-
{ ...texts.top1, anchor: "middle_bottom", x: 0 },
|
13
|
-
{ ...texts.bottom1, anchor: "middle_top", x: 0 },
|
14
|
-
] as Primitive[],
|
15
|
-
ports: [
|
16
|
-
{ ...refblocks.left1, labels: ["1", "left1"] }, // TODO add more "standard" labels
|
17
|
-
{ ...refblocks.left3, labels: ["3", "left3"] }, // TODO add more "standard" labels
|
18
|
-
{ ...refblocks.right1, labels: ["2", "right1"] }, // TODO add more "standard" labels
|
19
|
-
{ ...refblocks.right3, labels: ["4", "right3"] }, // TODO add more "standard" labels
|
20
|
-
],
|
21
|
-
size: { width: bounds.width, height: bounds.height },
|
22
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
23
|
-
})
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
-
import dpst_switch_horz from "./dpst_switch_horz"
|
3
|
-
|
4
|
-
const rotatedSymbol = rotateSymbol(dpst_switch_horz)
|
5
|
-
|
6
|
-
const texts = rotatedSymbol.primitives.filter((p) => p.type === "text")!
|
7
|
-
|
8
|
-
const val = texts.find((t) => t.text === "{VAL}")!
|
9
|
-
|
10
|
-
val.anchor = "middle_right"
|
11
|
-
val.x = -0.35
|
12
|
-
val.y = 0
|
13
|
-
|
14
|
-
const ref = texts.find((t) => t.text === "{REF}")!
|
15
|
-
|
16
|
-
ref.anchor = "middle_left"
|
17
|
-
ref.x = 0.3
|
18
|
-
ref.y = 0
|
19
|
-
|
20
|
-
export default rotatedSymbol
|