schematic-symbols 0.0.102 → 0.0.104
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 +1588 -2108
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/symbols/SPDT_switch_horz.ts +1 -0
- package/symbols/SPST_switch_horz.ts +10 -18
- package/symbols/constant_current_diode_horz.ts +7 -17
- package/symbols/constant_current_diode_vert.ts +9 -18
- package/symbols/crystal_horz.ts +7 -31
- package/symbols/crystal_vert.ts +9 -9
- package/symbols/darlington_pair_transistor_horz.ts +8 -19
- package/symbols/darlington_pair_transistor_vert.ts +11 -3
- package/symbols/dc_ammeter_horz.ts +3 -3
- package/symbols/dc_voltmeter_horz.ts +2 -2
- package/symbols/diac_horz.ts +7 -17
- package/symbols/diac_vert.ts +0 -1
- package/symbols/diode_right.ts +0 -1
- package/symbols/dpst_switch_horz.ts +1 -0
- package/symbols/filled_diode_horz.ts +7 -30
- package/symbols/frequency_meter_horz.ts +3 -3
- package/symbols/ground_vert.ts +0 -3
- package/symbols/gunn_diode_horz.ts +7 -21
- package/symbols/gunn_diode_vert.ts +10 -11
- package/symbols/igbt_transistor_horz.ts +8 -31
- package/symbols/illuminated_push_button_normally_open_horz.ts +7 -18
- package/symbols/laser_diode_horz.ts +8 -17
- package/symbols/npn_bipolar_transistor_horz.ts +8 -29
- package/symbols/npn_bipolar_transistor_vert.ts +10 -1
- package/symbols/photodiode_horz.ts +7 -30
- package/symbols/pnp_bipolar_transistor_horz.ts +8 -31
- package/symbols/pnp_bipolar_transistor_vert.ts +10 -2
- package/symbols/power_factor_meter_horz.ts +4 -4
- package/symbols/power_factor_meter_vert.ts +5 -2
- package/symbols/push_button_normally_closed_momentary_horz.ts +6 -4
- package/symbols/push_button_normally_closed_momentary_vert.ts +1 -20
- package/symbols/push_button_normally_open_momentary_horz.ts +6 -4
- package/symbols/push_button_normally_open_momentary_vert.ts +1 -20
- package/symbols/schottky_diode_horz.ts +2 -2
- package/symbols/silicon_controlled_rectifier_horz.ts +8 -16
- package/symbols/step_recovery_diode_horz.ts +7 -29
- package/symbols/tachometer_horz.ts +3 -3
- package/symbols/triac_horz.ts +8 -16
- package/symbols/var_meter_horz.ts +3 -3
- package/symbols/varmeter_horz.ts +3 -3
- package/symbols/volt_meter_horz.ts +7 -28
- package/symbols/watt_hour_meter_horz.ts +3 -3
- package/symbols/wattmeter_horz.ts +3 -3
package/package.json
CHANGED
@@ -2,6 +2,7 @@ import { defineSymbol } from "drawing/defineSymbol"
|
|
2
2
|
import svgJson from "assets/generated/SPDT_switch.json"
|
3
3
|
import { Primitive } from "drawing/types"
|
4
4
|
|
5
|
+
svgJson.bounds.width += 0.2
|
5
6
|
const { paths, texts, bounds, refblocks, circles } = svgJson
|
6
7
|
|
7
8
|
export default defineSymbol({
|
@@ -1,20 +1,12 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/SPST_switch.json"
|
3
|
-
import {
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
ports: [
|
15
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
16
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
17
|
-
],
|
18
|
-
size: { width: bounds.width, height: bounds.height },
|
19
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
20
|
-
})
|
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()
|
@@ -1,19 +1,9 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/constant_current_diode.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
{ ...texts.top1, anchor: "middle_left", x: -0.15, y: -0.4 },
|
11
|
-
{ ...texts.bottom1, anchor: "middle_left", x: -0.15 },
|
12
|
-
] as any,
|
13
|
-
ports: [
|
14
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
15
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
16
|
-
],
|
17
|
-
size: { width: bounds.width, height: bounds.height },
|
18
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
19
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
6
|
+
.labelPort("left1", ["1"])
|
7
|
+
.labelPort("right1", ["2"])
|
8
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
9
|
+
.build()
|
@@ -1,20 +1,11 @@
|
|
1
|
-
import
|
2
|
-
import constant_current_diode_horz from "./constant_current_diode_horz"
|
1
|
+
import svgJson from "assets/generated/constant_current_diode.json"
|
3
2
|
|
4
|
-
|
3
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
const ref = texts.find((t) => t.text === "{REF}")!
|
15
|
-
|
16
|
-
ref.y = 0
|
17
|
-
ref.x = 0.35
|
18
|
-
ref.anchor = "middle_left"
|
19
|
-
|
20
|
-
export default rotatedSymbol
|
5
|
+
export default modifySymbol(svgJson)
|
6
|
+
.rotateRightFacingSymbol("down")
|
7
|
+
.changeTextAnchor("{VAL}", "middle_right")
|
8
|
+
.labelPort("left1", ["1"])
|
9
|
+
.labelPort("right1", ["2"])
|
10
|
+
.changeTextAnchor("{REF}", "middle_left")
|
11
|
+
.build()
|
package/symbols/crystal_horz.ts
CHANGED
@@ -1,33 +1,9 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/crystal.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
// { ...texts.top1, anchor: "middle_left" },
|
11
|
-
// { ...texts.bottom1, anchor: "middle_left" },
|
12
|
-
{
|
13
|
-
type: "text",
|
14
|
-
text: "{REF}",
|
15
|
-
x: -0.012864500000000056,
|
16
|
-
y: -0.4150086999999978,
|
17
|
-
anchor: "middle_top",
|
18
|
-
},
|
19
|
-
{
|
20
|
-
type: "text",
|
21
|
-
text: "{VAL}",
|
22
|
-
x: -0.003850500000000423,
|
23
|
-
y: 0.4250087000000011,
|
24
|
-
anchor: "middle_bottom",
|
25
|
-
},
|
26
|
-
] as any,
|
27
|
-
ports: [
|
28
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
29
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
30
|
-
],
|
31
|
-
size: { width: bounds.width, height: bounds.height },
|
32
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
33
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_bottom")
|
6
|
+
.labelPort("left1", ["1"])
|
7
|
+
.labelPort("right1", ["2"])
|
8
|
+
.changeTextAnchor("{REF}", "middle_top")
|
9
|
+
.build()
|
package/symbols/crystal_vert.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import svgJson from "assets/generated/crystal.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.rotateRightFacingSymbol("down")
|
6
|
+
.changeTextAnchor("{VAL}", "middle_left")
|
7
|
+
.labelPort("left1", ["1"])
|
8
|
+
.labelPort("right1", ["2"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_right")
|
10
|
+
.build()
|
@@ -1,21 +1,10 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/darlington_pair_transistor.json"
|
3
|
-
import {
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
{ ...texts.right1, anchor: "middle_bottom" },
|
13
|
-
] as Primitive[],
|
14
|
-
ports: [
|
15
|
-
{ ...refblocks.right1, labels: ["3"] }, // TODO add more "standard" labels
|
16
|
-
{ ...refblocks.right2, labels: ["1"] }, // TODO add more "standard" labels
|
17
|
-
{ ...refblocks.right3, labels: ["2"] }, // TODO add more "standard" labels
|
18
|
-
],
|
19
|
-
size: { width: bounds.width, height: bounds.height },
|
20
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
21
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
6
|
+
.labelPort("right2", ["1"])
|
7
|
+
.labelPort("right3", ["2"])
|
8
|
+
.labelPort("right1", ["3"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
10
|
+
.build()
|
@@ -1,4 +1,12 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import svgJson from "assets/generated/darlington_pair_transistor.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
4
|
+
svgJson.bounds.width += 0.3
|
5
|
+
export default modifySymbol(svgJson)
|
6
|
+
.rotateRightFacingSymbol("down")
|
7
|
+
.changeTextAnchor("{VAL}", "middle_right")
|
8
|
+
.labelPort("right2", ["1"])
|
9
|
+
.labelPort("right3", ["2"])
|
10
|
+
.labelPort("right1", ["3"])
|
11
|
+
.changeTextAnchor("{REF}", "middle_left")
|
12
|
+
.build()
|
@@ -12,16 +12,16 @@ export default defineSymbol({
|
|
12
12
|
text: "{REF}",
|
13
13
|
x: 0,
|
14
14
|
y: -0.3594553499999995,
|
15
|
-
anchor: "
|
15
|
+
anchor: "middle_top",
|
16
16
|
},
|
17
17
|
{
|
18
18
|
type: "text",
|
19
19
|
text: "{VAL}",
|
20
20
|
x: 0,
|
21
21
|
y: 0.35,
|
22
|
-
anchor: "
|
22
|
+
anchor: "middle_bottom",
|
23
23
|
},
|
24
|
-
{ ...texts.left1, anchor: "center", fontSize: 0.3 },
|
24
|
+
{ ...texts.left1, x: 0, y: 0.01, anchor: "center", fontSize: 0.3 },
|
25
25
|
] as any,
|
26
26
|
ports: [
|
27
27
|
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
@@ -12,14 +12,14 @@ export default defineSymbol({
|
|
12
12
|
text: "{REF}",
|
13
13
|
x: 0,
|
14
14
|
y: -0.3594553499999995,
|
15
|
-
anchor: "
|
15
|
+
anchor: "middle_top",
|
16
16
|
},
|
17
17
|
{
|
18
18
|
type: "text",
|
19
19
|
text: "{VAL}",
|
20
20
|
x: 0,
|
21
21
|
y: 0.35,
|
22
|
-
anchor: "
|
22
|
+
anchor: "middle_bottom",
|
23
23
|
},
|
24
24
|
] as any,
|
25
25
|
ports: [
|
package/symbols/diac_horz.ts
CHANGED
@@ -1,19 +1,9 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/diac.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
{ ...texts.top1, anchor: "middle_bottom" },
|
11
|
-
{ ...texts.bottom1, anchor: "middle_top" },
|
12
|
-
] as any,
|
13
|
-
ports: [
|
14
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
15
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
16
|
-
],
|
17
|
-
size: { width: bounds.width, height: bounds.height },
|
18
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
19
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
6
|
+
.labelPort("left1", ["1"])
|
7
|
+
.labelPort("right1", ["2"])
|
8
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
9
|
+
.build()
|
package/symbols/diac_vert.ts
CHANGED
package/symbols/diode_right.ts
CHANGED
@@ -2,6 +2,7 @@ import { defineSymbol } from "drawing/defineSymbol"
|
|
2
2
|
import svgJson from "assets/generated/dpst_switch.json"
|
3
3
|
import { Primitive } from "drawing/types"
|
4
4
|
|
5
|
+
svgJson.bounds.width += 0.2
|
5
6
|
const { paths, texts, bounds, refblocks, circles } = svgJson
|
6
7
|
|
7
8
|
export default defineSymbol({
|
@@ -1,32 +1,9 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/filled_diode.json"
|
3
|
-
import {
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{
|
12
|
-
type: "text",
|
13
|
-
text: "{REF}",
|
14
|
-
x: -0.1,
|
15
|
-
y: -0.38,
|
16
|
-
anchor: "middle_bottom",
|
17
|
-
} as TextPrimitive,
|
18
|
-
{
|
19
|
-
type: "text",
|
20
|
-
text: "{VAL}",
|
21
|
-
x: -0.1,
|
22
|
-
y: 0.28,
|
23
|
-
anchor: "middle_top",
|
24
|
-
} as TextPrimitive,
|
25
|
-
] as any,
|
26
|
-
ports: [
|
27
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
28
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
29
|
-
],
|
30
|
-
size: { width: bounds.width, height: bounds.height },
|
31
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
32
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
6
|
+
.labelPort("left1", ["1"])
|
7
|
+
.labelPort("right1", ["2"])
|
8
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
9
|
+
.build()
|
@@ -12,16 +12,16 @@ export default defineSymbol({
|
|
12
12
|
text: "{REF}",
|
13
13
|
x: 0,
|
14
14
|
y: -0.3594553499999995,
|
15
|
-
anchor: "
|
15
|
+
anchor: "middle_top",
|
16
16
|
},
|
17
17
|
{
|
18
18
|
type: "text",
|
19
19
|
text: "{VAL}",
|
20
20
|
x: 0,
|
21
21
|
y: 0.35,
|
22
|
-
anchor: "
|
22
|
+
anchor: "middle_bottom",
|
23
23
|
},
|
24
|
-
{ ...texts.left1, anchor: "center", fontSize: 0.2 },
|
24
|
+
{ ...texts.left1, x: 0, y: 0.01, anchor: "center", fontSize: 0.2 },
|
25
25
|
] as any,
|
26
26
|
ports: [
|
27
27
|
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
package/symbols/ground_vert.ts
CHANGED
@@ -1,25 +1,11 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/gunn_diode.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
4
|
const { paths, texts, bounds, refblocks, circles } = svgJson
|
5
5
|
|
6
|
-
export default
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
type: "text",
|
13
|
-
text: "{VAL}",
|
14
|
-
x: -0.11,
|
15
|
-
y: 0.38773544999999987,
|
16
|
-
},
|
17
|
-
// { ...texts.bottom1, anchor: "middle_left" },
|
18
|
-
] as any,
|
19
|
-
ports: [
|
20
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
21
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
22
|
-
],
|
23
|
-
size: { width: bounds.width, height: bounds.height },
|
24
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
25
|
-
})
|
6
|
+
export default modifySymbol(svgJson)
|
7
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
8
|
+
.labelPort("left1", ["1"])
|
9
|
+
.labelPort("right1", ["2"])
|
10
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
11
|
+
.build()
|
@@ -1,12 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
import gunn_diode_horz from "./gunn_diode_horz"
|
1
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
import svgJson from "assets/generated/gunn_diode.json"
|
4
|
+
|
5
|
+
export default modifySymbol(svgJson)
|
6
|
+
.rotateRightFacingSymbol("down")
|
7
|
+
.changeTextAnchor("{VAL}", "middle_right")
|
8
|
+
.labelPort("left1", ["1"])
|
9
|
+
.labelPort("right1", ["2"])
|
10
|
+
.changeTextAnchor("{REF}", "middle_left")
|
11
|
+
.build()
|
@@ -1,33 +1,10 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/igbt_transistor.json"
|
3
|
-
import {
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
type: "text",
|
13
|
-
text: "{REF}",
|
14
|
-
x: 0,
|
15
|
-
y: -0.4,
|
16
|
-
anchor: "middle_right",
|
17
|
-
} as TextPrimitive,
|
18
|
-
{
|
19
|
-
type: "text",
|
20
|
-
text: "{VAL}",
|
21
|
-
x: 0,
|
22
|
-
y: 0.4,
|
23
|
-
anchor: "middle_right",
|
24
|
-
} as TextPrimitive,
|
25
|
-
] as any,
|
26
|
-
ports: [
|
27
|
-
{ ...refblocks.top1, labels: ["1"] }, // TODO add more "standard" labels
|
28
|
-
{ ...refblocks.bottom1, labels: ["2"] }, // TODO add more "standard" labels
|
29
|
-
{ ...refblocks.left1, labels: ["3"] }, // TODO add more "standard" labels
|
30
|
-
],
|
31
|
-
size: { width: bounds.width, height: bounds.height },
|
32
|
-
center: { x: bounds.centerX + 0.06, y: bounds.centerY },
|
33
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_right")
|
6
|
+
.labelPort("left1", ["3"])
|
7
|
+
.labelPort("top1", ["2"])
|
8
|
+
.labelPort("bottom1", ["1"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_right")
|
10
|
+
.build()
|
@@ -1,20 +1,9 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/illuminated_push_button_normally_open.json"
|
3
|
-
import {
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{ ...texts.top1, anchor: "middle_right", x: 0, y: -0.4 },
|
12
|
-
{ ...texts.bottom1, anchor: "middle_right", x: 0 },
|
13
|
-
] as Primitive[],
|
14
|
-
ports: [
|
15
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
16
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
17
|
-
],
|
18
|
-
size: { width: bounds.width, height: bounds.height },
|
19
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
20
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
6
|
+
.labelPort("left1", ["1"])
|
7
|
+
.labelPort("right1", ["2"])
|
8
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
9
|
+
.build()
|
@@ -1,19 +1,10 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/laser_diode.json"
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{ ...texts.bottom1, anchor: "middle_bottom" },
|
12
|
-
] as any,
|
13
|
-
ports: [
|
14
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
15
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
16
|
-
],
|
17
|
-
size: { width: bounds.width, height: bounds.height },
|
18
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
19
|
-
})
|
4
|
+
svgJson.bounds.width += 0.2
|
5
|
+
export default modifySymbol(svgJson)
|
6
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
7
|
+
.labelPort("left1", ["1"])
|
8
|
+
.labelPort("right1", ["2"])
|
9
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
10
|
+
.build()
|
@@ -1,32 +1,11 @@
|
|
1
1
|
import svgJson from "assets/generated/npn_bipolar_transistor.json"
|
2
|
-
import {
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
3
|
|
4
4
|
const { paths, texts, bounds, refblocks, circles } = svgJson
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
text: "{REF}",
|
13
|
-
x: -0.07,
|
14
|
-
y: -0.3596647999999991,
|
15
|
-
anchor: "middle_right",
|
16
|
-
},
|
17
|
-
{
|
18
|
-
type: "text",
|
19
|
-
text: "{VAL}",
|
20
|
-
x: -0.0679100444999996,
|
21
|
-
y: 0.4129789000000006,
|
22
|
-
anchor: "middle_right",
|
23
|
-
},
|
24
|
-
] as any,
|
25
|
-
ports: [
|
26
|
-
{ ...refblocks.top1, labels: ["1", "collector"] },
|
27
|
-
{ ...refblocks.bottom1, labels: ["2", "emitter"] },
|
28
|
-
{ ...refblocks.left1, labels: ["3", "base"] },
|
29
|
-
],
|
30
|
-
size: { width: bounds.width, height: bounds.height },
|
31
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
32
|
-
})
|
5
|
+
export default modifySymbol(svgJson)
|
6
|
+
.changeTextAnchor("{VAL}", "middle_right")
|
7
|
+
.labelPort("left1", ["3"])
|
8
|
+
.labelPort("top1", ["2"])
|
9
|
+
.labelPort("bottom1", ["1"])
|
10
|
+
.changeTextAnchor("{REF}", "middle_right")
|
11
|
+
.build()
|
@@ -1,5 +1,7 @@
|
|
1
1
|
import { rotateSymbol } from "drawing/rotateSymbol"
|
2
|
+
import svgJson from "assets/generated/npn_bipolar_transistor.json"
|
2
3
|
import npn_bipolar_transistor_horz from "./npn_bipolar_transistor_horz"
|
4
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
3
5
|
|
4
6
|
const rotatedSymbol = rotateSymbol(npn_bipolar_transistor_horz)
|
5
7
|
|
@@ -9,4 +11,11 @@ const ref = texts.find((t) => t.text === "{REF}")!
|
|
9
11
|
|
10
12
|
ref.anchor = "middle_left"
|
11
13
|
|
12
|
-
export default
|
14
|
+
export default modifySymbol(svgJson)
|
15
|
+
.rotateRightFacingSymbol("down")
|
16
|
+
.changeTextAnchor("{VAL}", "middle_right")
|
17
|
+
.labelPort("left1", ["3"])
|
18
|
+
.labelPort("top1", ["2"])
|
19
|
+
.labelPort("bottom1", ["1"])
|
20
|
+
.changeTextAnchor("{REF}", "middle_left")
|
21
|
+
.build()
|
@@ -1,32 +1,9 @@
|
|
1
|
-
import { defineSymbol } from "drawing/defineSymbol"
|
2
1
|
import svgJson from "assets/generated/photodiode.json"
|
3
|
-
import {
|
2
|
+
import { modifySymbol } from "drawing/modify-symbol/modify-symbol"
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
{
|
12
|
-
type: "text",
|
13
|
-
text: "{REF}",
|
14
|
-
x: -0.15,
|
15
|
-
y: -0.20318344999999938,
|
16
|
-
anchor: "middle_right",
|
17
|
-
} as TextPrimitive,
|
18
|
-
{
|
19
|
-
type: "text",
|
20
|
-
text: "{VAL}",
|
21
|
-
x: -0.00984920000000078,
|
22
|
-
y: 0.5,
|
23
|
-
anchor: "middle_top",
|
24
|
-
} as TextPrimitive,
|
25
|
-
] as any,
|
26
|
-
ports: [
|
27
|
-
{ ...refblocks.left1, labels: ["1"] }, // TODO add more "standard" labels
|
28
|
-
{ ...refblocks.right1, labels: ["2"] }, // TODO add more "standard" labels
|
29
|
-
],
|
30
|
-
size: { width: bounds.width, height: bounds.height },
|
31
|
-
center: { x: bounds.centerX, y: bounds.centerY },
|
32
|
-
})
|
4
|
+
export default modifySymbol(svgJson)
|
5
|
+
.changeTextAnchor("{VAL}", "middle_top")
|
6
|
+
.labelPort("left1", ["1"])
|
7
|
+
.labelPort("right1", ["2"])
|
8
|
+
.changeTextAnchor("{REF}", "middle_bottom")
|
9
|
+
.build()
|