@tscircuit/schematic-trace-solver 0.0.78 → 0.0.79
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.d.ts +5 -0
- package/dist/index.js +65 -0
- package/lib/solvers/NetLabelTraceCollisionSolver/NetLabelTraceCollisionSolver.ts +87 -1
- package/package.json +1 -1
- package/site/examples/example46.page.tsx +4 -0
- package/site/examples/example47.page.tsx +4 -0
- package/site/examples/example48.page.tsx +4 -0
- package/site/examples/example49.page.tsx +4 -0
- package/tests/assets/example46.json +236 -0
- package/tests/assets/example47.json +206 -0
- package/tests/assets/example48.json +104 -0
- package/tests/assets/example49.json +390 -0
- package/tests/examples/__snapshots__/example46.snap.svg +343 -0
- package/tests/examples/__snapshots__/example47.snap.svg +324 -0
- package/tests/examples/__snapshots__/example48.snap.svg +168 -0
- package/tests/examples/__snapshots__/example49.snap.svg +566 -0
- package/tests/examples/example46.test.ts +12 -0
- package/tests/examples/example47.test.ts +12 -0
- package/tests/examples/example48.test.ts +12 -0
- package/tests/examples/example49.test.ts +12 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="100%" height="100%" fill="white" />
|
|
3
|
+
<g>
|
|
4
|
+
<circle data-type="point" data-label="U1.1
|
|
5
|
+
x+" data-x="0.6100000000000005" data-y="0.015272324999999976" cx="360.7881209943128" cy="383.6456190736451" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="U1.2
|
|
9
|
+
x-" data-x="-1.7899999999999998" data-y="0.015272324999999976" cx="190.54205075718113" cy="383.6456190736451" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="U1.3
|
|
13
|
+
x+" data-x="0.6100000000000005" data-y="0.415272325" cx="360.7881209943128" cy="355.27127403412317" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="U1.4
|
|
17
|
+
x-" data-x="-1.7899999999999998" data-y="0.6152723250000001" cx="190.54205075718113" cy="341.0841015143622" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="U1.5
|
|
21
|
+
x-" data-x="-1.7899999999999998" data-y="0.41527232500000005" cx="190.54205075718113" cy="355.27127403412317" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="U1.6
|
|
25
|
+
x-" data-x="-1.7899999999999998" data-y="0.21527232500000004" cx="190.54205075718113" cy="369.45844655388413" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="U1.7
|
|
29
|
+
x+" data-x="0.6100000000000005" data-y="0.215272325" cx="360.7881209943128" cy="369.45844655388413" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="U1.8
|
|
33
|
+
x+" data-x="0.6100000000000005" data-y="0.6152723250000001" cx="360.7881209943128" cy="341.0841015143622" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="R1.1
|
|
37
|
+
y+" data-x="1.64945535" data-y="2.354727675" cx="434.52278287950537" cy="217.69433581000618" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="R1.2
|
|
41
|
+
y-" data-x="1.64945535" data-y="1.2547276749999998" cx="434.52278287950537" cy="295.72378466869156" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="R2.1
|
|
45
|
+
x-" data-x="1.3100000000000005" data-y="0.21527232500000038" cx="410.4432248134762" cy="369.45844655388413" r="3" fill="hsl(107, 100%, 50%, 0.8)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g>
|
|
48
|
+
<circle data-type="point" data-label="R2.2
|
|
49
|
+
x+" data-x="2.4100000000000006" data-y="0.21527232500000038" cx="488.4726736721616" cy="369.45844655388413" r="3" fill="hsl(108, 100%, 50%, 0.8)" />
|
|
50
|
+
</g>
|
|
51
|
+
<g>
|
|
52
|
+
<circle data-type="point" data-label="C1.1
|
|
53
|
+
y+" data-x="-2.0149999999999997" data-y="4.659727674999999" cx="174.58148167245005" cy="54.18717251976102" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<circle data-type="point" data-label="C1.2
|
|
57
|
+
y-" data-x="-2.0149999999999997" data-y="3.5597276749999995" cx="174.58148167245005" cy="132.21662137844635" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
|
|
58
|
+
</g>
|
|
59
|
+
<g>
|
|
60
|
+
<circle data-type="point" data-label="C2.1
|
|
61
|
+
y+" data-x="-1.7900000000000003" data-y="-1.2547276749999998" cx="190.5420507571811" cy="473.73416457412725" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
|
|
62
|
+
</g>
|
|
63
|
+
<g>
|
|
64
|
+
<circle data-type="point" data-label="C2.2
|
|
65
|
+
y-" data-x="-1.7900000000000003" data-y="-2.3547276750000004" cx="190.5420507571811" cy="551.7636134328127" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
|
|
66
|
+
</g>
|
|
67
|
+
<g>
|
|
68
|
+
<circle data-type="point" data-label="J1.1
|
|
69
|
+
x-" data-x="-0.18999999999999995" data-y="4.554727675" cx="304.0394309152689" cy="61.635438092635525" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
|
|
70
|
+
</g>
|
|
71
|
+
<g>
|
|
72
|
+
<circle data-type="point" data-label="J1.2
|
|
73
|
+
x-" data-x="-0.18999999999999995" data-y="4.3547276749999995" cx="304.0394309152689" cy="75.82261061239649" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
|
|
74
|
+
</g>
|
|
75
|
+
<g>
|
|
76
|
+
<circle data-type="point" data-label="J1.3
|
|
77
|
+
x-" data-x="-0.18999999999999995" data-y="4.154727674999999" cx="304.0394309152689" cy="90.00978313215751" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
|
|
78
|
+
</g>
|
|
79
|
+
<g>
|
|
80
|
+
<circle data-type="point" data-label="anchorPoint
|
|
81
|
+
orientation: y-" data-x="0.7100000000000005" data-y="-2.5547276750000005" cx="367.8817072541933" cy="565.9507859525736" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
82
|
+
</g>
|
|
83
|
+
<g>
|
|
84
|
+
<circle data-type="point" data-label="anchorPoint
|
|
85
|
+
orientation: y-" data-x="-2.0149999999999997" data-y="3.3597276749999994" cx="174.58148167245005" cy="146.40379389820734" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
86
|
+
</g>
|
|
87
|
+
<g>
|
|
88
|
+
<circle data-type="point" data-label="anchorPoint
|
|
89
|
+
orientation: y-" data-x="2.510000000000001" data-y="0.21527232500000082" cx="495.5662599320421" cy="369.4584465538841" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
90
|
+
</g>
|
|
91
|
+
<g>
|
|
92
|
+
<circle data-type="point" data-label="anchorPoint
|
|
93
|
+
orientation: x+" data-x="0.6100000000000005" data-y="0.415272325" cx="360.7881209943128" cy="355.27127403412317" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
94
|
+
</g>
|
|
95
|
+
<g>
|
|
96
|
+
<circle data-type="point" data-label="anchorPoint
|
|
97
|
+
orientation: x-" data-x="-0.18999999999999995" data-y="4.3547276749999995" cx="304.0394309152689" cy="75.82261061239649" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
98
|
+
</g>
|
|
99
|
+
<g>
|
|
100
|
+
<circle data-type="point" data-label="anchorPoint
|
|
101
|
+
orientation: y+" data-x="-1.9899999999999998" data-y="1.015272325" cx="176.35487823742017" cy="312.7097564748403" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
102
|
+
</g>
|
|
103
|
+
<g>
|
|
104
|
+
<circle data-type="point" data-label="anchorPoint
|
|
105
|
+
orientation: y+" data-x="1.64945535" data-y="2.354727675" cx="434.52278287950537" cy="217.69433581000618" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
106
|
+
</g>
|
|
107
|
+
<g>
|
|
108
|
+
<circle data-type="point" data-label="anchorPoint
|
|
109
|
+
orientation: x-" data-x="-0.18999999999999995" data-y="4.554727675" cx="304.0394309152689" cy="61.635438092635525" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
110
|
+
</g>
|
|
111
|
+
<g>
|
|
112
|
+
<circle data-type="point" data-label="anchorPoint
|
|
113
|
+
orientation: x-" data-x="-2.09" data-y="0.4152723250000001" cx="169.26129197753966" cy="355.27127403412317" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
114
|
+
</g>
|
|
115
|
+
<g>
|
|
116
|
+
<circle data-type="point" data-label="anchorPoint
|
|
117
|
+
orientation: y-" data-x="0.9100000000000006" data-y="0.215272325" cx="382.0688797739543" cy="369.45844655388413" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
118
|
+
</g>
|
|
119
|
+
<g>
|
|
120
|
+
<polyline data-points="-1.7899999999999998,0.41527232500000005 -1.7900000000000003,-1.2547276749999998" data-type="line" data-label="" points="190.54205075718113,355.27127403412317 190.5420507571811,473.73416457412725" fill="none" stroke="hsl(296, 100%, 50%, 0.8)" stroke-width="1" />
|
|
121
|
+
</g>
|
|
122
|
+
<g>
|
|
123
|
+
<polyline data-points="1.64945535,1.2547276749999998 0.6100000000000005,0.215272325" data-type="line" data-label="" points="434.52278287950537,295.72378466869156 360.7881209943128,369.45844655388413" fill="none" stroke="hsl(248, 100%, 50%, 0.8)" stroke-width="1" />
|
|
124
|
+
</g>
|
|
125
|
+
<g>
|
|
126
|
+
<polyline data-points="0.6100000000000005,0.215272325 1.3100000000000005,0.21527232500000038" data-type="line" data-label="" points="360.7881209943128,369.45844655388413 410.4432248134762,369.45844655388413" fill="none" stroke="hsl(160, 100%, 50%, 0.8)" stroke-width="1" />
|
|
127
|
+
</g>
|
|
128
|
+
<g>
|
|
129
|
+
<polyline data-points="0.6100000000000005,0.015272324999999976 -2.0149999999999997,3.5597276749999995" data-type="line" data-label="" points="360.7881209943128,383.6456190736451 174.58148167245005,132.21662137844635" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
130
|
+
</g>
|
|
131
|
+
<g>
|
|
132
|
+
<polyline data-points="0.6100000000000005,0.015272324999999976 -1.7900000000000003,-2.3547276750000004" data-type="line" data-label="" points="360.7881209943128,383.6456190736451 190.5420507571811,551.7636134328127" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
133
|
+
</g>
|
|
134
|
+
<g>
|
|
135
|
+
<polyline data-points="0.6100000000000005,0.015272324999999976 -0.18999999999999995,4.154727674999999" data-type="line" data-label="" points="360.7881209943128,383.6456190736451 304.0394309152689,90.00978313215751" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
136
|
+
</g>
|
|
137
|
+
<g>
|
|
138
|
+
<polyline data-points="-2.0149999999999997,3.5597276749999995 -1.7900000000000003,-2.3547276750000004" data-type="line" data-label="" points="174.58148167245005,132.21662137844635 190.5420507571811,551.7636134328127" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
139
|
+
</g>
|
|
140
|
+
<g>
|
|
141
|
+
<polyline data-points="-2.0149999999999997,3.5597276749999995 -0.18999999999999995,4.154727674999999" data-type="line" data-label="" points="174.58148167245005,132.21662137844635 304.0394309152689,90.00978313215751" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
142
|
+
</g>
|
|
143
|
+
<g>
|
|
144
|
+
<polyline data-points="-1.7900000000000003,-2.3547276750000004 -0.18999999999999995,4.154727674999999" data-type="line" data-label="" points="190.5420507571811,551.7636134328127 304.0394309152689,90.00978313215751" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
145
|
+
</g>
|
|
146
|
+
<g>
|
|
147
|
+
<polyline data-points="-1.7899999999999998,0.015272324999999976 -1.7899999999999998,0.21527232500000004" data-type="line" data-label="" points="190.54205075718113,383.6456190736451 190.54205075718113,369.45844655388413" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
148
|
+
</g>
|
|
149
|
+
<g>
|
|
150
|
+
<polyline data-points="-1.7899999999999998,0.015272324999999976 2.4100000000000006,0.21527232500000038" data-type="line" data-label="" points="190.54205075718113,383.6456190736451 488.4726736721616,369.45844655388413" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
151
|
+
</g>
|
|
152
|
+
<g>
|
|
153
|
+
<polyline data-points="-1.7899999999999998,0.015272324999999976 -2.0149999999999997,4.659727674999999" data-type="line" data-label="" points="190.54205075718113,383.6456190736451 174.58148167245005,54.18717251976102" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
154
|
+
</g>
|
|
155
|
+
<g>
|
|
156
|
+
<polyline data-points="-1.7899999999999998,0.21527232500000004 2.4100000000000006,0.21527232500000038" data-type="line" data-label="" points="190.54205075718113,369.45844655388413 488.4726736721616,369.45844655388413" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
157
|
+
</g>
|
|
158
|
+
<g>
|
|
159
|
+
<polyline data-points="-1.7899999999999998,0.21527232500000004 -2.0149999999999997,4.659727674999999" data-type="line" data-label="" points="190.54205075718113,369.45844655388413 174.58148167245005,54.18717251976102" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
160
|
+
</g>
|
|
161
|
+
<g>
|
|
162
|
+
<polyline data-points="2.4100000000000006,0.21527232500000038 -2.0149999999999997,4.659727674999999" data-type="line" data-label="" points="488.4726736721616,369.45844655388413 174.58148167245005,54.18717251976102" fill="none" stroke="hsl(234, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
163
|
+
</g>
|
|
164
|
+
<g>
|
|
165
|
+
<polyline data-points="0.6100000000000005,0.415272325 -0.18999999999999995,4.3547276749999995" data-type="line" data-label="" points="360.7881209943128,355.27127403412317 304.0394309152689,75.82261061239649" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
166
|
+
</g>
|
|
167
|
+
<g>
|
|
168
|
+
<polyline data-points="-1.7899999999999998,0.6152723250000001 0.6100000000000005,0.6152723250000001" data-type="line" data-label="" points="190.54205075718113,341.0841015143622 360.7881209943128,341.0841015143622" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
169
|
+
</g>
|
|
170
|
+
<g>
|
|
171
|
+
<polyline data-points="-1.7899999999999998,0.6152723250000001 1.64945535,2.354727675" data-type="line" data-label="" points="190.54205075718113,341.0841015143622 434.52278287950537,217.69433581000618" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
172
|
+
</g>
|
|
173
|
+
<g>
|
|
174
|
+
<polyline data-points="-1.7899999999999998,0.6152723250000001 -0.18999999999999995,4.554727675" data-type="line" data-label="" points="190.54205075718113,341.0841015143622 304.0394309152689,61.635438092635525" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
175
|
+
</g>
|
|
176
|
+
<g>
|
|
177
|
+
<polyline data-points="0.6100000000000005,0.6152723250000001 1.64945535,2.354727675" data-type="line" data-label="" points="360.7881209943128,341.0841015143622 434.52278287950537,217.69433581000618" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
178
|
+
</g>
|
|
179
|
+
<g>
|
|
180
|
+
<polyline data-points="0.6100000000000005,0.6152723250000001 -0.18999999999999995,4.554727675" data-type="line" data-label="" points="360.7881209943128,341.0841015143622 304.0394309152689,61.635438092635525" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
181
|
+
</g>
|
|
182
|
+
<g>
|
|
183
|
+
<polyline data-points="1.64945535,2.354727675 -0.18999999999999995,4.554727675" data-type="line" data-label="" points="434.52278287950537,217.69433581000618 304.0394309152689,61.635438092635525" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
184
|
+
</g>
|
|
185
|
+
<g>
|
|
186
|
+
<polyline data-points="-1.7899999999999998,0.4152723250000001 -2.09,0.4152723250000001 -2.09,-0.41972767499999986 -1.7900000000000003,-0.41972767499999986 -1.7900000000000003,-1.2547276749999998" data-type="line" data-label="" points="190.54205075718113,355.27127403412317 169.26129197753966,355.27127403412317 169.26129197753966,414.5027193041252 190.5420507571811,414.5027193041252 190.5420507571811,473.73416457412725" fill="none" stroke="purple" stroke-width="1" />
|
|
187
|
+
</g>
|
|
188
|
+
<g>
|
|
189
|
+
<polyline data-points="1.3100000000000005,0.21527232500000038 1.1100000000000005,0.21527232500000038 1.1100000000000005,0.7350000000000001 1.64945535,0.7350000000000001 1.64945535,1.2547276749999998" data-type="line" data-label="" points="410.4432248134762,369.45844655388413 396.25605229371524,369.45844655388413 396.25605229371524,332.5911156112878 434.52278287950537,332.5911156112878 434.52278287950537,295.72378466869156" fill="none" stroke="purple" stroke-width="1" />
|
|
190
|
+
</g>
|
|
191
|
+
<g>
|
|
192
|
+
<polyline data-points="0.6100000000000005,0.215272325 1.3100000000000005,0.21527232500000038" data-type="line" data-label="" points="360.7881209943128,369.45844655388413 410.4432248134762,369.45844655388413" fill="none" stroke="purple" stroke-width="1" />
|
|
193
|
+
</g>
|
|
194
|
+
<g>
|
|
195
|
+
<polyline data-points="-1.7899999999999998,0.21527232500000004 -1.8899999999999997,0.21527232500000004 -1.8899999999999997,0.015272324999999976 -1.7899999999999998,0.015272324999999976" data-type="line" data-label="" points="190.54205075718113,369.45844655388413 183.44846449730065,369.45844655388413 183.44846449730065,383.6456190736451 190.54205075718113,383.6456190736451" fill="none" stroke="purple" stroke-width="1" />
|
|
196
|
+
</g>
|
|
197
|
+
<g>
|
|
198
|
+
<polyline data-points="0.610000000000001,0.015272324999999753 0.7100000000000005,0.015272324999999753 0.7100000000000005,-2.5547276750000005 -1.7900000000000003,-2.5547276750000005 -1.7900000000000003,-2.3547276750000004" data-type="line" data-label="" points="360.78812099431286,383.64561907364515 367.8817072541933,383.64561907364515 367.8817072541933,565.9507859525736 190.5420507571811,565.9507859525736 190.5420507571811,551.7636134328127" fill="none" stroke="purple" stroke-width="1" />
|
|
199
|
+
</g>
|
|
200
|
+
<g>
|
|
201
|
+
<polyline data-points="-2.0149999999999997,3.5597276749999995 -2.0149999999999997,3.3597276749999994 -1.1025,3.3597276749999994 -1.1025,4.154727674999999 -0.18999999999999995,4.154727674999999" data-type="line" data-label="" points="174.58148167245005,132.21662137844635 174.58148167245005,146.40379389820734 239.31045629385943,146.40379389820734 239.31045629385943,90.00978313215751 304.0394309152689,90.00978313215751" fill="none" stroke="purple" stroke-width="1" />
|
|
202
|
+
</g>
|
|
203
|
+
<g>
|
|
204
|
+
<polyline data-points="2.410000000000001,0.21527232500000082 2.610000000000001,0.21527232500000082 2.610000000000001,4.859727674999999 -2.0149999999999997,4.859727674999999 -2.0149999999999997,4.659727674999999" data-type="line" data-label="" points="488.4726736721616,369.4584465538841 502.6598461919226,369.4584465538841 502.6598461919226,40.00000000000006 174.58148167245005,40.00000000000006 174.58148167245005,54.18717251976102" fill="none" stroke="purple" stroke-width="1" />
|
|
205
|
+
</g>
|
|
206
|
+
<g>
|
|
207
|
+
<polyline data-points="-1.7899999999999998,0.6152723250000001 -1.9899999999999998,0.6152723250000001 -1.9899999999999998,1.015272325 0.8100000000000007,1.015272325 0.8100000000000007,0.6152723250000001 0.6100000000000005,0.6152723250000001" data-type="line" data-label="" points="190.54205075718113,341.0841015143622 176.35487823742017,341.0841015143622 176.35487823742017,312.7097564748403 374.97529351407377,312.7097564748403 374.97529351407377,341.0841015143622 360.7881209943128,341.0841015143622" fill="none" stroke="purple" stroke-width="1" />
|
|
208
|
+
</g>
|
|
209
|
+
<g>
|
|
210
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="-0.5899999999999996" data-y="0.315272325" x="190.54205075718113" y="326.89692899460124" width="170.24607023713168" height="70.93586259880487" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.014097241696428573" />
|
|
211
|
+
</g>
|
|
212
|
+
<g>
|
|
213
|
+
<rect data-type="rect" data-label="schematic_component_1" data-x="1.88195535" data-y="1.8047276749999999" x="420.7289248903029" y="217.69433581000618" width="60.57289208684921" height="78.02944885868538" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.014097241696428573" />
|
|
214
|
+
</g>
|
|
215
|
+
<g>
|
|
216
|
+
<rect data-type="rect" data-label="schematic_component_2" data-x="1.8600000000000005" data-y="0.21527232500000035" x="410.4432248134762" y="341.8320953579147" width="78.02944885868538" height="55.25270239193884" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.014097241696428573" />
|
|
217
|
+
</g>
|
|
218
|
+
<g>
|
|
219
|
+
<rect data-type="rect" data-label="schematic_component_3" data-x="-1.8774999999999997" data-y="4.109727674999999" x="144.788419380952" y="54.18717251976102" width="79.0934867976674" height="78.02944885868533" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.014097241696428573" />
|
|
220
|
+
</g>
|
|
221
|
+
<g>
|
|
222
|
+
<rect data-type="rect" data-label="schematic_component_4" data-x="-1.6525000000000003" data-y="-1.804727675" x="160.74898846568306" y="473.73416457412725" width="79.09348679766742" height="78.02944885868544" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.014097241696428573" />
|
|
223
|
+
</g>
|
|
224
|
+
<g>
|
|
225
|
+
<rect data-type="rect" data-label="schematic_component_5" data-x="0.9100000000000001" data-y="4.3547276749999995" x="304.0394309152689" y="47.448265572874504" width="156.0588977173707" height="56.74869007904397" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.014097241696428573" />
|
|
226
|
+
</g>
|
|
227
|
+
<g>
|
|
228
|
+
<rect data-type="rect" data-label="netId: GND
|
|
229
|
+
globalConnNetId: connectivity_net2" data-x="0.7100000000000005" data-y="-2.7947276750000007" x="360.7881209943128" y="565.9507859525736" width="14.187172519760963" height="34.0492140474264" fill="#00000066" stroke="#000000" stroke-width="0.014097241696428573" />
|
|
230
|
+
</g>
|
|
231
|
+
<g>
|
|
232
|
+
<rect data-type="rect" data-label="netId: GND
|
|
233
|
+
globalConnNetId: connectivity_net2" data-x="-2.0149999999999997" data-y="3.119727674999999" x="167.48789541256954" y="146.40379389820734" width="14.187172519760992" height="34.049214047426375" fill="#00000066" stroke="#000000" stroke-width="0.014097241696428573" />
|
|
234
|
+
</g>
|
|
235
|
+
<g>
|
|
236
|
+
<rect data-type="rect" data-label="netId: NODE
|
|
237
|
+
globalConnNetId: connectivity_net3" data-x="2.510000000000001" data-y="-0.08472767499999917" x="488.4726736721616" y="369.4584465538841" width="14.18717251976102" height="42.56151755928295" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.014097241696428573" />
|
|
238
|
+
</g>
|
|
239
|
+
<g>
|
|
240
|
+
<rect data-type="rect" data-label="netId: OUT
|
|
241
|
+
globalConnNetId: connectivity_net4" data-x="0.8510000000000005" data-y="0.415272325" x="360.8590568569116" y="348.1776877742427" width="34.04921404742635" height="14.187172519760963" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.014097241696428573" />
|
|
242
|
+
</g>
|
|
243
|
+
<g>
|
|
244
|
+
<rect data-type="rect" data-label="netId: OUT
|
|
245
|
+
globalConnNetId: connectivity_net4" data-x="-0.43099999999999994" data-y="4.3547276749999995" x="269.91928100524376" y="68.72902435251603" width="34.04921404742635" height="14.187172519760907" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.014097241696428573" />
|
|
246
|
+
</g>
|
|
247
|
+
<g>
|
|
248
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
249
|
+
globalConnNetId: connectivity_net5" data-x="-1.9899999999999998" data-y="1.255272325" x="169.26129197753966" y="278.66054242741393" width="14.187172519760992" height="34.04921404742635" fill="#ef444466" stroke="#ef4444" stroke-width="0.014097241696428573" />
|
|
250
|
+
</g>
|
|
251
|
+
<g>
|
|
252
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
253
|
+
globalConnNetId: connectivity_net5" data-x="1.64945535" data-y="2.5957276749999996" x="427.4291966196249" y="183.5741858999811" width="14.187172519760963" height="34.04921404742629" fill="#ef444466" stroke="#ef4444" stroke-width="0.014097241696428573" />
|
|
254
|
+
</g>
|
|
255
|
+
<g>
|
|
256
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
257
|
+
globalConnNetId: connectivity_net5" data-x="-0.43099999999999994" data-y="4.554727675" x="269.91928100524376" y="54.54185183275507" width="34.04921404742635" height="14.187172519760907" fill="#ef444466" stroke="#ef4444" stroke-width="0.014097241696428573" />
|
|
258
|
+
</g>
|
|
259
|
+
<g>
|
|
260
|
+
<rect data-type="rect" data-label="netId: U1.CTRL to C2.pin1
|
|
261
|
+
globalConnNetId: connectivity_net0" data-x="-2.315" data-y="0.4152723250000001" x="137.34015380807747" y="348.17768777424266" width="31.921138169462182" height="14.187172519760963" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.014097241696428573" />
|
|
262
|
+
</g>
|
|
263
|
+
<g>
|
|
264
|
+
<rect data-type="rect" data-label="netId: U1.DISCH to R2.pin1
|
|
265
|
+
globalConnNetId: connectivity_net1" data-x="0.9100000000000006" data-y="-0.009727675000000019" x="374.97529351407377" y="369.45844655388413" width="14.18717251976102" height="31.92113816946221" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.014097241696428573" />
|
|
266
|
+
</g>
|
|
267
|
+
<g id="crosshair" style="display: none">
|
|
268
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
269
|
+
<line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5" /><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text>
|
|
270
|
+
</g>
|
|
271
|
+
<script>
|
|
272
|
+
<![CDATA[
|
|
273
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
274
|
+
const svg = e.currentTarget;
|
|
275
|
+
const rect = svg.getBoundingClientRect();
|
|
276
|
+
const x = e.clientX - rect.left;
|
|
277
|
+
const y = e.clientY - rect.top;
|
|
278
|
+
const crosshair = svg.getElementById('crosshair');
|
|
279
|
+
const h = svg.getElementById('crosshair-h');
|
|
280
|
+
const v = svg.getElementById('crosshair-v');
|
|
281
|
+
const coords = svg.getElementById('coordinates');
|
|
282
|
+
|
|
283
|
+
crosshair.style.display = 'block';
|
|
284
|
+
h.setAttribute('x1', '0');
|
|
285
|
+
h.setAttribute('x2', '640');
|
|
286
|
+
h.setAttribute('y1', y);
|
|
287
|
+
h.setAttribute('y2', y);
|
|
288
|
+
v.setAttribute('x1', x);
|
|
289
|
+
v.setAttribute('x2', x);
|
|
290
|
+
v.setAttribute('y1', '0');
|
|
291
|
+
v.setAttribute('y2', '640');
|
|
292
|
+
|
|
293
|
+
// Calculate real coordinates using inverse transformation
|
|
294
|
+
const matrix = {
|
|
295
|
+
"a": 70.93586259880486,
|
|
296
|
+
"c": 0,
|
|
297
|
+
"e": 317.5172448090418,
|
|
298
|
+
"b": 0,
|
|
299
|
+
"d": -70.93586259880486,
|
|
300
|
+
"f": 384.7289746214094
|
|
301
|
+
};
|
|
302
|
+
// Manually invert and apply the affine transform
|
|
303
|
+
// Since we only use translate and scale, we can directly compute:
|
|
304
|
+
// x' = (x - tx) / sx
|
|
305
|
+
// y' = (y - ty) / sy
|
|
306
|
+
const sx = matrix.a;
|
|
307
|
+
const sy = matrix.d;
|
|
308
|
+
const tx = matrix.e;
|
|
309
|
+
const ty = matrix.f;
|
|
310
|
+
const realPoint = {
|
|
311
|
+
x: (x - tx) / sx,
|
|
312
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
316
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
317
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
318
|
+
});
|
|
319
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
320
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
321
|
+
});
|
|
322
|
+
]]>
|
|
323
|
+
</script>
|
|
324
|
+
</svg>
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="100%" height="100%" fill="white" />
|
|
3
|
+
<g>
|
|
4
|
+
<circle data-type="point" data-label="U1.1
|
|
5
|
+
x+" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="504.016" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="U1.2
|
|
9
|
+
x-" data-x="-1.2000000000000002" data-y="-0.30000000000000004" cx="40" cy="504.016" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="U1.3
|
|
13
|
+
x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="459.216" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="U1.4
|
|
17
|
+
x-" data-x="-1.2000000000000002" data-y="0.30000000000000004" cx="40" cy="436.816" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="U1.5
|
|
21
|
+
x-" data-x="-1.2000000000000002" data-y="0.10000000000000003" cx="40" cy="459.216" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="U1.6
|
|
25
|
+
x-" data-x="-1.2000000000000002" data-y="-0.09999999999999998" cx="40" cy="481.616" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="U1.7
|
|
29
|
+
x+" data-x="1.2000000000000002" data-y="-0.10000000000000003" cx="308.80000000000007" cy="481.616" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="U1.8
|
|
33
|
+
x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="308.80000000000007" cy="436.816" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="J1.1
|
|
37
|
+
x-" data-x="1.6" data-y="2.505" cx="353.6" cy="189.856" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="J1.2
|
|
41
|
+
x-" data-x="1.6" data-y="2.3049999999999997" cx="353.6" cy="212.25600000000003" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="J1.3
|
|
45
|
+
x-" data-x="1.6" data-y="2.1049999999999995" cx="353.6" cy="234.65600000000006" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g>
|
|
48
|
+
<circle data-type="point" data-label="anchorPoint
|
|
49
|
+
orientation: y-" data-x="1.4000000000000001" data-y="-0.0010000000000000278" cx="331.20000000000005" cy="470.528" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
50
|
+
</g>
|
|
51
|
+
<g>
|
|
52
|
+
<circle data-type="point" data-label="anchorPoint
|
|
53
|
+
orientation: x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="459.216" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<circle data-type="point" data-label="anchorPoint
|
|
57
|
+
orientation: x-" data-x="1.6" data-y="2.3049999999999997" cx="353.6" cy="212.25600000000003" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
58
|
+
</g>
|
|
59
|
+
<g>
|
|
60
|
+
<circle data-type="point" data-label="anchorPoint
|
|
61
|
+
orientation: y+" data-x="1.3010000000000002" data-y="0.5010000000000001" cx="320.1120000000001" cy="414.304" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
62
|
+
</g>
|
|
63
|
+
<g>
|
|
64
|
+
<circle data-type="point" data-label="anchorPoint
|
|
65
|
+
orientation: y+" data-x="1.499" data-y="2.706" cx="342.288" cy="167.344" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
66
|
+
</g>
|
|
67
|
+
<g>
|
|
68
|
+
<polyline data-points="1.2000000000000002,-0.30000000000000004 1.6,2.1049999999999995" data-type="line" data-label="" points="308.80000000000007,504.016 353.6,234.65600000000006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
69
|
+
</g>
|
|
70
|
+
<g>
|
|
71
|
+
<polyline data-points="1.2000000000000002,0.09999999999999998 1.6,2.3049999999999997" data-type="line" data-label="" points="308.80000000000007,459.216 353.6,212.25600000000003" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
72
|
+
</g>
|
|
73
|
+
<g>
|
|
74
|
+
<polyline data-points="1.2000000000000002,0.30000000000000004 1.6,2.505" data-type="line" data-label="" points="308.80000000000007,436.816 353.6,189.856" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
75
|
+
</g>
|
|
76
|
+
<g>
|
|
77
|
+
<polyline data-points="1.2000000000000002,-0.30000000000000004 1.2000000000000002,-0.0010000000000000278 1.7810000000000001,-0.0010000000000000278 1.7810000000000001,0.20099999999999998 1.6,0.20099999999999998 1.6,2.1049999999999995" data-type="line" data-label="" points="308.80000000000007,504.016 308.80000000000007,470.528 373.87200000000007,470.528 373.87200000000007,447.904 353.6,447.904 353.6,234.65600000000006" fill="none" stroke="purple" stroke-width="1" />
|
|
78
|
+
</g>
|
|
79
|
+
<g>
|
|
80
|
+
<polyline data-points="1.2000000000000002,0.30000000000000004 1.3010000000000002,0.30000000000000004 1.3010000000000002,0.5010000000000001" data-type="line" data-label="" points="308.80000000000007,436.816 320.1120000000001,436.816 320.1120000000001,414.304" fill="none" stroke="purple" stroke-width="1" />
|
|
81
|
+
</g>
|
|
82
|
+
<g>
|
|
83
|
+
<polyline data-points="1.6,2.505 1.499,2.505 1.499,2.706" data-type="line" data-label="" points="353.6,189.856 342.288,189.856 342.288,167.344" fill="none" stroke="purple" stroke-width="1" />
|
|
84
|
+
</g>
|
|
85
|
+
<g>
|
|
86
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="40" y="414.416" width="268.80000000000007" height="111.99999999999994" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428" />
|
|
87
|
+
</g>
|
|
88
|
+
<g>
|
|
89
|
+
<rect data-type="rect" data-label="schematic_component_1" data-x="2.7" data-y="2.3049999999999997" x="353.6" y="167.45600000000002" width="246.39999999999998" height="89.60000000000002" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428" />
|
|
90
|
+
</g>
|
|
91
|
+
<g>
|
|
92
|
+
<rect data-type="rect" data-label="netId: GND
|
|
93
|
+
globalConnNetId: connectivity_net0" data-x="1.4000000000000001" data-y="-0.241" x="320" y="470.528" width="22.40000000000009" height="53.75999999999999" fill="#00000066" stroke="#000000" stroke-width="0.008928571428571428" />
|
|
94
|
+
</g>
|
|
95
|
+
<g>
|
|
96
|
+
<rect data-type="rect" data-label="netId: OUT
|
|
97
|
+
globalConnNetId: connectivity_net1" data-x="1.441" data-y="0.09999999999999998" x="308.91200000000003" y="448.016" width="53.75999999999999" height="22.399999999999977" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
|
|
98
|
+
</g>
|
|
99
|
+
<g>
|
|
100
|
+
<rect data-type="rect" data-label="netId: OUT
|
|
101
|
+
globalConnNetId: connectivity_net1" data-x="1.3590000000000002" data-y="2.3049999999999997" x="299.72800000000007" y="201.05600000000004" width="53.75999999999999" height="22.400000000000006" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
|
|
102
|
+
</g>
|
|
103
|
+
<g>
|
|
104
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
105
|
+
globalConnNetId: connectivity_net2" data-x="1.3010000000000002" data-y="0.7410000000000001" x="308.91200000000003" y="360.544" width="22.400000000000034" height="53.75999999999999" fill="#ef444466" stroke="#ef4444" stroke-width="0.008928571428571428" />
|
|
106
|
+
</g>
|
|
107
|
+
<g>
|
|
108
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
109
|
+
globalConnNetId: connectivity_net2" data-x="1.499" data-y="2.9459999999999997" x="331.088" y="113.584" width="22.400000000000034" height="53.76000000000005" fill="#ef444466" stroke="#ef4444" stroke-width="0.008928571428571428" />
|
|
110
|
+
</g>
|
|
111
|
+
<g id="crosshair" style="display: none">
|
|
112
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
113
|
+
<line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5" /><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text>
|
|
114
|
+
</g>
|
|
115
|
+
<script>
|
|
116
|
+
<![CDATA[
|
|
117
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
118
|
+
const svg = e.currentTarget;
|
|
119
|
+
const rect = svg.getBoundingClientRect();
|
|
120
|
+
const x = e.clientX - rect.left;
|
|
121
|
+
const y = e.clientY - rect.top;
|
|
122
|
+
const crosshair = svg.getElementById('crosshair');
|
|
123
|
+
const h = svg.getElementById('crosshair-h');
|
|
124
|
+
const v = svg.getElementById('crosshair-v');
|
|
125
|
+
const coords = svg.getElementById('coordinates');
|
|
126
|
+
|
|
127
|
+
crosshair.style.display = 'block';
|
|
128
|
+
h.setAttribute('x1', '0');
|
|
129
|
+
h.setAttribute('x2', '640');
|
|
130
|
+
h.setAttribute('y1', y);
|
|
131
|
+
h.setAttribute('y2', y);
|
|
132
|
+
v.setAttribute('x1', x);
|
|
133
|
+
v.setAttribute('x2', x);
|
|
134
|
+
v.setAttribute('y1', '0');
|
|
135
|
+
v.setAttribute('y2', '640');
|
|
136
|
+
|
|
137
|
+
// Calculate real coordinates using inverse transformation
|
|
138
|
+
const matrix = {
|
|
139
|
+
"a": 112,
|
|
140
|
+
"c": 0,
|
|
141
|
+
"e": 174.40000000000003,
|
|
142
|
+
"b": 0,
|
|
143
|
+
"d": -112,
|
|
144
|
+
"f": 470.416
|
|
145
|
+
};
|
|
146
|
+
// Manually invert and apply the affine transform
|
|
147
|
+
// Since we only use translate and scale, we can directly compute:
|
|
148
|
+
// x' = (x - tx) / sx
|
|
149
|
+
// y' = (y - ty) / sy
|
|
150
|
+
const sx = matrix.a;
|
|
151
|
+
const sy = matrix.d;
|
|
152
|
+
const tx = matrix.e;
|
|
153
|
+
const ty = matrix.f;
|
|
154
|
+
const realPoint = {
|
|
155
|
+
x: (x - tx) / sx,
|
|
156
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
160
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
161
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
162
|
+
});
|
|
163
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
164
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
165
|
+
});
|
|
166
|
+
]]>
|
|
167
|
+
</script>
|
|
168
|
+
</svg>
|