@tscircuit/schematic-trace-solver 0.0.88 → 0.0.89
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 +30 -22
- package/lib/solvers/Example28Solver/reroute.ts +10 -0
- package/package.json +1 -1
- package/tests/bug-reports/bug-report-20260706T213649Z/__snapshots__/bug-report-20260706T213649Z.snap.svg +386 -0
- package/tests/bug-reports/bug-report-20260706T213649Z/bug-report-20260706T213649Z.json +1471 -0
- package/tests/bug-reports/bug-report-20260706T213649Z/bug-report-20260706T213649Z.test.ts +12 -0
- package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +251 -2097
- package/tests/bug-reports/bug-report-20260707T134549Z/__snapshots__/bug-report-20260707T134549Z.snap.svg +123 -856
- package/tests/bug-reports/bug-report-20260707T134722Z/__snapshots__/bug-report-20260707T134722Z.snap.svg +72 -274
- package/tests/bug-reports/bug-report-20260707T140410Z/__snapshots__/bug-report-20260707T140410Z.snap.svg +153 -949
- package/tests/bug-reports/bug-report-20260707T141025Z/__snapshots__/bug-report-20260707T141025Z.snap.svg +66 -217
- package/tests/bug-reports/bug-report-20260707T141421Z/__snapshots__/bug-report-20260707T141421Z.snap.svg +113 -612
- package/tests/bug-reports/bug-report-20260707T141421Z/bug-report-20260707T141421Z.test.ts +11 -0
- package/tests/examples/__snapshots__/example03.snap.svg +44 -44
- package/tests/examples/__snapshots__/example32.snap.svg +3 -3
- package/tests/repros/__snapshots__/repro-atmega328p-fault-pullup.snap.svg +87 -283
- package/tests/repros/__snapshots__/repro-atmega328p-missing-gnd-netlabel.snap.svg +117 -469
|
@@ -1,275 +1,73 @@
|
|
|
1
|
-
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
x+" data-x="2.5599999999999996" data-y="-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
x
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</g>
|
|
51
|
-
<g>
|
|
52
|
-
<circle data-type="point" data-label="R_LOAD.2
|
|
53
|
-
y-" data-x="3.7395915124999988" data-y="-0.8499999999999999" cx="415.0501415811936" cy="215.44487667094418" r="3" fill="hsl(111, 100%, 50%, 0.8)" />
|
|
54
|
-
</g>
|
|
55
|
-
<g>
|
|
56
|
-
<circle data-type="point" data-label="anchorPoint
|
|
57
|
-
orientation: y-" data-x="-0.9000000000000012" data-y="-2.051" cx="75.23013262436137" cy="303.41034295339324" 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="3.7373638374999993" data-y="-4.525" cx="414.8869788250731" cy="484.61480888410006" 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="3.7395915124999988" data-y="-0.8499999999999999" cx="415.0501415811936" cy="215.44487667094418" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
66
|
-
</g>
|
|
67
|
-
<g>
|
|
68
|
-
<circle data-type="point" data-label="anchorPoint
|
|
69
|
-
orientation: x-" data-x="-0.4400000000000013" data-y="-1.85" cx="108.92215135036184" cy="288.6883956405104" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
70
|
-
</g>
|
|
71
|
-
<g>
|
|
72
|
-
<circle data-type="point" data-label="anchorPoint
|
|
73
|
-
orientation: x-" data-x="-0.4400000000000006" data-y="-4.525" cx="108.92215135036189" cy="484.61480888410006" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
74
|
-
</g>
|
|
75
|
-
<g>
|
|
76
|
-
<circle data-type="point" data-label="anchorPoint
|
|
77
|
-
orientation: y+" data-x="2.9099999999999997" data-y="-2" cx="354.28793989840875" cy="299.6749234859453" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
78
|
-
</g>
|
|
79
|
-
<g>
|
|
80
|
-
<circle data-type="point" data-label="anchorPoint
|
|
81
|
-
orientation: x-" data-x="3.149795756249999" data-y="-0.8897957562499996" cx="371.8514249201271" cy="218.35965789874928" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
82
|
-
</g>
|
|
83
|
-
<g>
|
|
84
|
-
<circle data-type="point" data-label="anchorPoint
|
|
85
|
-
orientation: x+" data-x="5.304727675" data-y="-1.8" cx="529.6862217892165" cy="285.0262196920321" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
86
|
-
</g>
|
|
87
|
-
<g>
|
|
88
|
-
<polyline data-points="3.26,-2 2.5599999999999996,-2" data-type="line" data-label="" points="379.92317153775696,299.6749234859453 328.65270825906055,299.6749234859453" fill="none" stroke="hsl(232, 100%, 50%, 0.8)" stroke-width="1" />
|
|
89
|
-
</g>
|
|
90
|
-
<g>
|
|
91
|
-
<polyline data-points="4.34,-2 5.304727675,-2" data-type="line" data-label="" points="459.02617202488847,299.6749234859453 529.6862217892165,299.6749234859453" fill="none" stroke="hsl(240, 100%, 50%, 0.8)" stroke-width="1" />
|
|
92
|
-
</g>
|
|
93
|
-
<g>
|
|
94
|
-
<polyline data-points="-0.4400000000000013,-1.85 -0.4400000000000006,-4.525" data-type="line" data-label="" points="108.92215135036184,288.6883956405104 108.92215135036189,484.61480888410006" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1" />
|
|
95
|
-
</g>
|
|
96
|
-
<g>
|
|
97
|
-
<polyline data-points="2.5599999999999996,-1 3.7395915124999988,0.2500000000000002" data-type="line" data-label="" points="328.65270825906055,226.43140451637913 415.0501415811936,134.87700580442134" fill="none" stroke="hsl(64, 100%, 50%, 0.8)" stroke-width="1" />
|
|
98
|
-
</g>
|
|
99
|
-
<g>
|
|
100
|
-
<polyline data-points="-0.4400000000000013,-0.9500000000000001 -0.4400000000000013,-2.05" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 108.92215135036184,303.33709943442364" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
101
|
-
</g>
|
|
102
|
-
<g>
|
|
103
|
-
<polyline data-points="-0.4400000000000013,-0.9500000000000001 2.1599999999999993,-4.525" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 299.3553006712341,484.61480888410006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
104
|
-
</g>
|
|
105
|
-
<g>
|
|
106
|
-
<polyline data-points="-0.4400000000000013,-0.9500000000000001 5.314727674999999,-3.08" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 530.4186569789122,378.7779239730769" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
107
|
-
</g>
|
|
108
|
-
<g>
|
|
109
|
-
<polyline data-points="-0.4400000000000013,-0.9500000000000001 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
110
|
-
</g>
|
|
111
|
-
<g>
|
|
112
|
-
<polyline data-points="-0.4400000000000013,-2.05 2.1599999999999993,-4.525" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 299.3553006712341,484.61480888410006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
113
|
-
</g>
|
|
114
|
-
<g>
|
|
115
|
-
<polyline data-points="-0.4400000000000013,-2.05 5.314727674999999,-3.08" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 530.4186569789122,378.7779239730769" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
116
|
-
</g>
|
|
117
|
-
<g>
|
|
118
|
-
<polyline data-points="-0.4400000000000013,-2.05 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
119
|
-
</g>
|
|
120
|
-
<g>
|
|
121
|
-
<polyline data-points="2.1599999999999993,-4.525 5.314727674999999,-3.08" data-type="line" data-label="" points="299.3553006712341,484.61480888410006 530.4186569789122,378.7779239730769" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
122
|
-
</g>
|
|
123
|
-
<g>
|
|
124
|
-
<polyline data-points="2.1599999999999993,-4.525 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="299.3553006712341,484.61480888410006 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
125
|
-
</g>
|
|
126
|
-
<g>
|
|
127
|
-
<polyline data-points="5.314727674999999,-3.08 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="530.4186569789122,378.7779239730769 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
128
|
-
</g>
|
|
129
|
-
<g>
|
|
130
|
-
<polyline data-points="-0.4400000000000013,-1.85 -0.4400000000000006,-4.525" data-type="line" data-label="" points="108.92215135036184,288.6883956405104 108.92215135036189,484.61480888410006" fill="none" stroke="hsl(114, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
131
|
-
</g>
|
|
132
|
-
<g>
|
|
133
|
-
<polyline data-points="2.5599999999999996,-2 3.26,-2" data-type="line" data-label="" points="328.65270825906055,299.6749234859453 379.92317153775696,299.6749234859453" fill="none" stroke="hsl(5, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
134
|
-
</g>
|
|
135
|
-
<g>
|
|
136
|
-
<polyline data-points="2.5599999999999996,-1 3.7395915124999988,0.2500000000000002" data-type="line" data-label="" points="328.65270825906055,226.43140451637913 415.0501415811936,134.87700580442134" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
137
|
-
</g>
|
|
138
|
-
<g>
|
|
139
|
-
<polyline data-points="5.304727675,-2 4.34,-2" data-type="line" data-label="" points="529.6862217892165,299.6749234859453 459.02617202488847,299.6749234859453" fill="none" stroke="hsl(2, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
140
|
-
</g>
|
|
141
|
-
<g>
|
|
142
|
-
<polyline data-points="3.26,-2 2.5599999999999996,-2" data-type="line" data-label="" points="379.92317153775696,299.6749234859453 328.65270825906055,299.6749234859453" fill="none" stroke="purple" stroke-width="1" />
|
|
143
|
-
</g>
|
|
144
|
-
<g>
|
|
145
|
-
<polyline data-points="4.34,-2 4.822363837499999,-2 4.822363837499999,-1.8 5.304727675,-1.8 5.304727675,-2" data-type="line" data-label="" points="459.02617202488847,299.6749234859453 494.35619690705244,299.6749234859453 494.35619690705244,285.0262196920321 529.6862217892165,285.0262196920321 529.6862217892165,299.6749234859453" fill="none" stroke="purple" stroke-width="1" />
|
|
146
|
-
</g>
|
|
147
|
-
<g>
|
|
148
|
-
<polyline data-points="2.5599999999999996,-1 3.149795756249999,-1 3.149795756249999,0.45000000000000023 3.7395915124999988,0.45000000000000023 3.7395915124999988,0.2500000000000002" data-type="line" data-label="" points="328.65270825906055,226.43140451637913 371.8514249201271,226.43140451637913 371.8514249201271,120.22830201050809 415.0501415811936,120.22830201050809 415.0501415811936,134.87700580442134" fill="none" stroke="purple" stroke-width="1" />
|
|
149
|
-
</g>
|
|
150
|
-
<g>
|
|
151
|
-
<polyline data-points="2.1599999999999993,-4.525 5.314727674999999,-4.525 5.314727674999999,-3.08" data-type="line" data-label="" points="299.3553006712341,484.61480888410006 530.4186569789122,484.61480888410006 530.4186569789122,378.7779239730769" fill="none" stroke="purple" stroke-width="1" />
|
|
152
|
-
</g>
|
|
153
|
-
<g>
|
|
154
|
-
<polyline data-points="-0.4400000000000013,-2.05 -1.3810000000000013,-2.0500000000000003 -1.3810000000000013,-1.65 -0.6400000000000012,-1.65 -0.6400000000000012,-0.9500000000000001 -0.4400000000000013,-0.9500000000000001" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 40.000000000000014,303.3370994344237 40.000000000000014,274.0396918465972 94.27344755644859,274.0396918465972 94.27344755644859,222.76922856790083 108.92215135036184,222.76922856790083" fill="none" stroke="purple" stroke-width="1" />
|
|
155
|
-
</g>
|
|
156
|
-
<g>
|
|
157
|
-
<polyline data-points="-0.6400000000000012,-2.0500000000000003 -0.9000000000000012,-2.0500000000000003 -0.9000000000000012,-2.051" data-type="line" data-label="" points="94.27344755644859,303.3370994344237 75.23013262436137,303.3370994344237 75.23013262436137,303.41034295339324" fill="none" stroke="purple" stroke-width="1" />
|
|
158
|
-
</g>
|
|
159
|
-
<g>
|
|
160
|
-
<rect data-type="rect" data-label="schematic_component_0" data-x="1.0599999999999992" data-y="-1.5" x="108.92215135036184" y="160.51223744376955" width="219.7305569086987" height="205.08185311478542" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572" />
|
|
161
|
-
</g>
|
|
162
|
-
<g>
|
|
163
|
-
<rect data-type="rect" data-label="schematic_component_1" data-x="0.8599999999999994" data-y="-4.525" x="108.92215135036189" y="468.1350171159477" width="190.4331493208722" height="32.95958353630476" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572" />
|
|
164
|
-
</g>
|
|
165
|
-
<g>
|
|
166
|
-
<rect data-type="rect" data-label="schematic_component_2" data-x="5.3097276749999995" data-y="-2.54" x="506.63445935510657" y="299.6749234859453" width="46.83596005791543" height="79.10300048713157" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572" />
|
|
167
|
-
</g>
|
|
168
|
-
<g>
|
|
169
|
-
<rect data-type="rect" data-label="schematic_component_3" data-x="3.8" data-y="-2" x="379.92317153775696" y="263.05316400116226" width="79.10300048713151" height="73.24351896956625" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572" />
|
|
170
|
-
</g>
|
|
171
|
-
<g>
|
|
172
|
-
<rect data-type="rect" data-label="schematic_component_4" data-x="4.109455349999998" data-y="-0.2999999999999998" x="403.35112458736637" y="134.87700580442134" width="77.57829198383001" height="80.56787086652284" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572" />
|
|
173
|
-
</g>
|
|
174
|
-
<g>
|
|
175
|
-
<rect data-type="rect" data-label="BQ24075-SYSOFF-BEHAVIORAL" data-x="1.459999999999999" data-y="-3.03" x="138.21955893818836" y="368.52383131733757" width="219.73055690869865" height="13.183833414521928" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572" />
|
|
176
|
-
</g>
|
|
177
|
-
<g>
|
|
178
|
-
<rect data-type="rect" data-label="U1" data-x="0.0799999999999993" data-y="0.029999999999999805" x="138.21955893818836" y="144.39866327046497" width="17.578444552695913" height="13.183833414521928" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572" />
|
|
179
|
-
</g>
|
|
180
|
-
<g>
|
|
181
|
-
<rect data-type="rect" data-label="BQ24075-SYSOFF-STEP" data-x="1.0999999999999994" data-y="-4.880000000000001" x="138.21955893818838" y="504.02434141103515" width="166.99522325061102" height="13.183833414521928" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572" />
|
|
182
|
-
</g>
|
|
183
|
-
<g>
|
|
184
|
-
<rect data-type="rect" data-label="V_SYSOFF" data-x="0.4399999999999994" data-y="-4.17" x="138.21955893818838" y="452.02144294264315" width="70.31377821078357" height="13.183833414521814" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572" />
|
|
185
|
-
</g>
|
|
186
|
-
<g>
|
|
187
|
-
<rect data-type="rect" data-label="netId: GND
|
|
188
|
-
globalConnNetId: connectivity_net4" data-x="-0.9000000000000012" data-y="-2.2910000000000004" x="59.84899364075247" y="303.41034295339324" width="30.762277967217813" height="35.156889105391826" fill="#00000066" stroke="#000000" stroke-width="0.013653085133928572" />
|
|
189
|
-
</g>
|
|
190
|
-
<g>
|
|
191
|
-
<rect data-type="rect" data-label="netId: GND
|
|
192
|
-
globalConnNetId: connectivity_net4" data-x="3.7373638374999993" data-y="-4.765000000000001" x="399.5058398414642" y="484.61480888410006" width="30.762277967217813" height="35.15688910539188" fill="#00000066" stroke="#000000" stroke-width="0.013653085133928572" />
|
|
193
|
-
</g>
|
|
194
|
-
<g>
|
|
195
|
-
<rect data-type="rect" data-label="netId: GND
|
|
196
|
-
globalConnNetId: connectivity_net4" data-x="3.7395915124999988" data-y="-1.0909999999999997" x="399.66900259758467" y="215.51812018991376" width="30.762277967217813" height="35.15688910539177" fill="#00000066" stroke="#000000" stroke-width="0.013653085133928572" />
|
|
197
|
-
</g>
|
|
198
|
-
<g>
|
|
199
|
-
<rect data-type="rect" data-label="netId: SYSOFF
|
|
200
|
-
globalConnNetId: connectivity_net2" data-x="-0.8610000000000012" data-y="-1.85" x="47.32435189695664" y="281.3640437435538" width="61.524555934435625" height="14.648703793913228" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572" />
|
|
201
|
-
</g>
|
|
202
|
-
<g>
|
|
203
|
-
<rect data-type="rect" data-label="netId: SYSOFF
|
|
204
|
-
globalConnNetId: connectivity_net2" data-x="-0.8610000000000005" data-y="-4.525" x="47.3243518969567" y="477.29045698714356" width="61.524555934435625" height="14.648703793913114" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572" />
|
|
205
|
-
</g>
|
|
206
|
-
<g>
|
|
207
|
-
<rect data-type="rect" data-label="netId: BAT
|
|
208
|
-
globalConnNetId: connectivity_net0" data-x="2.9099999999999997" data-y="-1.76" x="346.96358800145214" y="264.51803438055356" width="14.648703793913285" height="35.15688910539177" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572" />
|
|
209
|
-
</g>
|
|
210
|
-
<g>
|
|
211
|
-
<rect data-type="rect" data-label="netId: OUT
|
|
212
|
-
globalConnNetId: connectivity_net3" data-x="2.9097957562499994" data-y="-0.8897957562499996" x="336.69453581473533" y="211.03530600179266" width="35.15688910539177" height="14.648703793913228" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572" />
|
|
213
|
-
</g>
|
|
214
|
-
<g>
|
|
215
|
-
<rect data-type="rect" data-label="netId: BAT_SRC
|
|
216
|
-
globalConnNetId: connectivity_net1" data-x="5.784727674999999" data-y="-1.8" x="529.6862217892165" y="277.7018677950755" width="70.31377821078354" height="14.648703793913228" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572" />
|
|
217
|
-
</g>
|
|
218
|
-
<g id="crosshair" style="display: none">
|
|
219
|
-
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
220
|
-
<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>
|
|
221
|
-
</g>
|
|
222
|
-
<script>
|
|
223
|
-
<![CDATA[
|
|
224
|
-
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
225
|
-
const svg = e.currentTarget;
|
|
226
|
-
const rect = svg.getBoundingClientRect();
|
|
227
|
-
const x = e.clientX - rect.left;
|
|
228
|
-
const y = e.clientY - rect.top;
|
|
229
|
-
const crosshair = svg.getElementById('crosshair');
|
|
230
|
-
const h = svg.getElementById('crosshair-h');
|
|
231
|
-
const v = svg.getElementById('crosshair-v');
|
|
232
|
-
const coords = svg.getElementById('coordinates');
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="3.26,-2 2.5599999999999996,-2" data-type="line" data-label="" points="379.92317153775696,299.6749234859453 328.65270825906055,299.6749234859453" fill="none" stroke="hsl(232, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="4.34,-2 5.304727675,-2" data-type="line" data-label="" points="459.02617202488847,299.6749234859453 529.6862217892165,299.6749234859453" fill="none" stroke="hsl(240, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-0.4400000000000013,-1.85 -0.4400000000000006,-4.525" data-type="line" data-label="" points="108.92215135036184,288.6883956405104 108.92215135036189,484.61480888410006" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="2.5599999999999996,-1 3.7395915124999988,0.2500000000000002" data-type="line" data-label="" points="328.65270825906055,226.43140451637913 415.0501415811936,134.87700580442134" fill="none" stroke="hsl(64, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-0.4400000000000013,-0.9500000000000001 -0.4400000000000013,-2.05" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 108.92215135036184,303.33709943442364" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.4400000000000013,-0.9500000000000001 2.1599999999999993,-4.525" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 299.3553006712341,484.61480888410006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.4400000000000013,-0.9500000000000001 5.314727674999999,-3.08" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 530.4186569789122,378.7779239730769" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.4400000000000013,-0.9500000000000001 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="108.92215135036184,222.76922856790083 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.4400000000000013,-2.05 2.1599999999999993,-4.525" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 299.3553006712341,484.61480888410006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.4400000000000013,-2.05 5.314727674999999,-3.08" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 530.4186569789122,378.7779239730769" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.4400000000000013,-2.05 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.1599999999999993,-4.525 5.314727674999999,-3.08" data-type="line" data-label="" points="299.3553006712341,484.61480888410006 530.4186569789122,378.7779239730769" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.1599999999999993,-4.525 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="299.3553006712341,484.61480888410006 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="5.314727674999999,-3.08 3.7395915124999988,-0.8499999999999999" data-type="line" data-label="" points="530.4186569789122,378.7779239730769 415.0501415811936,215.44487667094418" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-0.4400000000000013,-1.85 -0.4400000000000006,-4.525" data-type="line" data-label="" points="108.92215135036184,288.6883956405104 108.92215135036189,484.61480888410006" fill="none" stroke="hsl(114, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.5599999999999996,-2 3.26,-2" data-type="line" data-label="" points="328.65270825906055,299.6749234859453 379.92317153775696,299.6749234859453" fill="none" stroke="hsl(5, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.5599999999999996,-1 3.7395915124999988,0.2500000000000002" data-type="line" data-label="" points="328.65270825906055,226.43140451637913 415.0501415811936,134.87700580442134" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="5.304727675,-2 4.34,-2" data-type="line" data-label="" points="529.6862217892165,299.6749234859453 459.02617202488847,299.6749234859453" fill="none" stroke="hsl(2, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.26,-2 2.5599999999999996,-2" data-type="line" data-label="" points="379.92317153775696,299.6749234859453 328.65270825906055,299.6749234859453" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="4.34,-2 4.822363837499999,-2 4.822363837499999,-1.8 5.304727675,-1.8 5.304727675,-2" data-type="line" data-label="" points="459.02617202488847,299.6749234859453 494.35619690705244,299.6749234859453 494.35619690705244,285.0262196920321 529.6862217892165,285.0262196920321 529.6862217892165,299.6749234859453" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.5599999999999996,-1 3.149795756249999,-1 3.149795756249999,0.45000000000000023 3.7395915124999988,0.45000000000000023 3.7395915124999988,0.2500000000000002" data-type="line" data-label="" points="328.65270825906055,226.43140451637913 371.8514249201271,226.43140451637913 371.8514249201271,120.22830201050809 415.0501415811936,120.22830201050809 415.0501415811936,134.87700580442134" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.1599999999999993,-4.525 5.314727674999999,-4.525 5.314727674999999,-3.08" data-type="line" data-label="" points="299.3553006712341,484.61480888410006 530.4186569789122,484.61480888410006 530.4186569789122,378.7779239730769" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.4400000000000013,-2.05 -1.3810000000000013,-2.0500000000000003 -1.3810000000000013,-1.65 -0.6400000000000012,-1.65 -0.6400000000000012,-0.9500000000000001 -0.4400000000000013,-0.9500000000000001" data-type="line" data-label="" points="108.92215135036184,303.33709943442364 40.000000000000014,303.3370994344237 40.000000000000014,274.0396918465972 94.27344755644859,274.0396918465972 94.27344755644859,222.76922856790083 108.92215135036184,222.76922856790083" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-0.6400000000000012,-2.0500000000000003 -0.9000000000000012,-2.0500000000000003 -0.9000000000000012,-2.051" data-type="line" data-label="" points="94.27344755644859,303.3370994344237 75.23013262436137,303.3370994344237 75.23013262436137,303.41034295339324" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="1.0599999999999992" data-y="-1.5" x="108.92215135036187" y="160.51223744376955" width="219.7305569086987" height="205.08185311478542" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="0.8599999999999994" data-y="-4.525" x="108.9221513503619" y="468.1350171159477" width="190.4331493208722" height="32.95958353630476" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="5.3097276749999995" data-y="-2.54" x="506.6344593551066" y="299.6749234859453" width="46.83596005791543" height="79.10300048713157" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="3.8" data-y="-2" x="379.92317153775696" y="263.0531640011622" width="79.10300048713151" height="73.24351896956625" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="4.109455349999998" data-y="-0.2999999999999998" x="403.35112458736637" y="134.87700580442134" width="77.57829198383001" height="80.56787086652284" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="BQ24075-SYSOFF-BEHAVIORAL" data-x="1.459999999999999" data-y="-3.03" x="138.21955893818836" y="368.5238313173376" width="219.73055690869865" height="13.183833414521928" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="U1" data-x="0.0799999999999993" data-y="0.029999999999999805" x="138.21955893818836" y="144.39866327046497" width="17.578444552695913" height="13.183833414521928" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="BQ24075-SYSOFF-STEP" data-x="1.0999999999999994" data-y="-4.880000000000001" x="138.21955893818836" y="504.0243414110352" width="166.99522325061102" height="13.183833414521928" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="V_SYSOFF" data-x="0.4399999999999994" data-y="-4.17" x="138.21955893818836" y="452.02144294264315" width="70.31377821078357" height="13.183833414521814" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
2
|
+
globalConnNetId: connectivity_net4" data-x="-0.9000000000000012" data-y="-2.2910000000000004" x="59.84899364075247" y="303.4103429533932" width="30.762277967217813" height="35.156889105391826" fill="#00000066" stroke="#000000" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
3
|
+
globalConnNetId: connectivity_net4" data-x="3.7373638374999993" data-y="-4.765000000000001" x="399.5058398414642" y="484.61480888410006" width="30.762277967217813" height="35.15688910539188" fill="#00000066" stroke="#000000" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
4
|
+
globalConnNetId: connectivity_net4" data-x="3.7395915124999988" data-y="-1.0909999999999997" x="399.6690025975847" y="215.51812018991376" width="30.762277967217813" height="35.15688910539177" fill="#00000066" stroke="#000000" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: SYSOFF
|
|
5
|
+
globalConnNetId: connectivity_net2" data-x="-0.8610000000000012" data-y="-1.85" x="47.32435189695664" y="281.3640437435538" width="61.524555934435625" height="14.648703793913228" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: SYSOFF
|
|
6
|
+
globalConnNetId: connectivity_net2" data-x="-0.8610000000000005" data-y="-4.525" x="47.3243518969567" y="477.2904569871435" width="61.524555934435625" height="14.648703793913114" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: BAT
|
|
7
|
+
globalConnNetId: connectivity_net0" data-x="2.9099999999999997" data-y="-1.76" x="346.9635880014521" y="264.5180343805536" width="14.648703793913285" height="35.15688910539177" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: OUT
|
|
8
|
+
globalConnNetId: connectivity_net3" data-x="2.9097957562499994" data-y="-0.8897957562499996" x="336.6945358147353" y="211.03530600179266" width="35.15688910539177" height="14.648703793913228" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572"/></g><g><rect data-type="rect" data-label="netId: BAT_SRC
|
|
9
|
+
globalConnNetId: connectivity_net1" data-x="5.784727674999999" data-y="-1.8" x="529.6862217892165" y="277.7018677950755" width="70.31377821078354" height="14.648703793913228" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013653085133928572"/></g><g><circle data-type="point" data-label="U1.1
|
|
10
|
+
x-" data-x="-0.4400000000000013" data-y="-0.9500000000000001" cx="108.92215135036184" cy="222.76922856790083" r="3" fill="hsl(319, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.2
|
|
11
|
+
x-" data-x="-0.4400000000000013" data-y="-1.85" cx="108.92215135036184" cy="288.6883956405104" r="3" fill="hsl(320, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.3
|
|
12
|
+
x+" data-x="2.5599999999999996" data-y="-2" cx="328.65270825906055" cy="299.6749234859453" r="3" fill="hsl(321, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.4
|
|
13
|
+
x+" data-x="2.5599999999999996" data-y="-1" cx="328.65270825906055" cy="226.43140451637913" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.5
|
|
14
|
+
x-" data-x="-0.4400000000000013" data-y="-2.05" cx="108.92215135036184" cy="303.33709943442364" r="3" fill="hsl(323, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="V_SYSOFF.1
|
|
15
|
+
x-" data-x="-0.4400000000000006" data-y="-4.525" cx="108.92215135036189" cy="484.61480888410006" r="3" fill="hsl(270, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="V_SYSOFF.2
|
|
16
|
+
x+" data-x="2.1599999999999993" data-y="-4.525" cx="299.3553006712341" cy="484.61480888410006" r="3" fill="hsl(271, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="V_BAT.1
|
|
17
|
+
y+" data-x="5.304727675" data-y="-2" cx="529.6862217892165" cy="299.6749234859453" r="3" fill="hsl(191, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="V_BAT.2
|
|
18
|
+
y-" data-x="5.314727674999999" data-y="-3.08" cx="530.4186569789122" cy="378.7779239730769" r="3" fill="hsl(192, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="IBAT_PROBE.1
|
|
19
|
+
x-" data-x="3.26" data-y="-2" cx="379.92317153775696" cy="299.6749234859453" r="3" fill="hsl(72, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="IBAT_PROBE.2
|
|
20
|
+
x+" data-x="4.34" data-y="-2" cx="459.02617202488847" cy="299.6749234859453" r="3" fill="hsl(72, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_LOAD.1
|
|
21
|
+
y+" data-x="3.7395915124999988" data-y="0.2500000000000002" cx="415.0501415811936" cy="134.87700580442134" r="3" fill="hsl(110, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_LOAD.2
|
|
22
|
+
y-" data-x="3.7395915124999988" data-y="-0.8499999999999999" cx="415.0501415811936" cy="215.44487667094418" r="3" fill="hsl(111, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
23
|
+
orientation: y-" data-x="-0.9000000000000012" data-y="-2.051" cx="75.23013262436137" cy="303.41034295339324" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
24
|
+
orientation: y-" data-x="3.7373638374999993" data-y="-4.525" cx="414.8869788250731" cy="484.61480888410006" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
25
|
+
orientation: y-" data-x="3.7395915124999988" data-y="-0.8499999999999999" cx="415.0501415811936" cy="215.44487667094418" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
26
|
+
orientation: x-" data-x="-0.4400000000000013" data-y="-1.85" cx="108.92215135036184" cy="288.6883956405104" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
27
|
+
orientation: x-" data-x="-0.4400000000000006" data-y="-4.525" cx="108.92215135036189" cy="484.61480888410006" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
28
|
+
orientation: y+" data-x="2.9099999999999997" data-y="-2" cx="354.28793989840875" cy="299.6749234859453" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
29
|
+
orientation: x-" data-x="3.149795756249999" data-y="-0.8897957562499996" cx="371.8514249201271" cy="218.35965789874928" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
30
|
+
orientation: x+" data-x="5.304727675" data-y="-1.8" cx="529.6862217892165" cy="285.0262196920321" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><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></g><script><![CDATA[
|
|
31
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
32
|
+
const svg = e.currentTarget;
|
|
33
|
+
const rect = svg.getBoundingClientRect();
|
|
34
|
+
const x = e.clientX - rect.left;
|
|
35
|
+
const y = e.clientY - rect.top;
|
|
36
|
+
const crosshair = svg.getElementById('crosshair');
|
|
37
|
+
const h = svg.getElementById('crosshair-h');
|
|
38
|
+
const v = svg.getElementById('crosshair-v');
|
|
39
|
+
const coords = svg.getElementById('coordinates');
|
|
40
|
+
|
|
41
|
+
crosshair.style.display = 'block';
|
|
42
|
+
h.setAttribute('x1', '0');
|
|
43
|
+
h.setAttribute('x2', '640');
|
|
44
|
+
h.setAttribute('y1', y);
|
|
45
|
+
h.setAttribute('y2', y);
|
|
46
|
+
v.setAttribute('x1', x);
|
|
47
|
+
v.setAttribute('x2', x);
|
|
48
|
+
v.setAttribute('y1', '0');
|
|
49
|
+
v.setAttribute('y2', '640');
|
|
233
50
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
const sx = matrix.a;
|
|
258
|
-
const sy = matrix.d;
|
|
259
|
-
const tx = matrix.e;
|
|
260
|
-
const ty = matrix.f;
|
|
261
|
-
const realPoint = {
|
|
262
|
-
x: (x - tx) / sx,
|
|
263
|
-
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
267
|
-
coords.setAttribute('x', (x + 5).toString());
|
|
268
|
-
coords.setAttribute('y', (y - 5).toString());
|
|
269
|
-
});
|
|
270
|
-
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
271
|
-
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
272
|
-
});
|
|
273
|
-
]]>
|
|
274
|
-
</script>
|
|
275
|
-
</svg>
|
|
51
|
+
// Calculate real coordinates using inverse transformation
|
|
52
|
+
const matrix = {"a":73.24351896956622,"c":0,"e":141.14929969697107,"b":0,"d":-73.24351896956622,"f":153.1878855468129};
|
|
53
|
+
// Manually invert and apply the affine transform
|
|
54
|
+
// Since we only use translate and scale, we can directly compute:
|
|
55
|
+
// x' = (x - tx) / sx
|
|
56
|
+
// y' = (y - ty) / sy
|
|
57
|
+
const sx = matrix.a;
|
|
58
|
+
const sy = matrix.d;
|
|
59
|
+
const tx = matrix.e;
|
|
60
|
+
const ty = matrix.f;
|
|
61
|
+
const realPoint = {
|
|
62
|
+
x: (x - tx) / sx,
|
|
63
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
67
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
68
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
69
|
+
});
|
|
70
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
71
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
72
|
+
});
|
|
73
|
+
]]></script></svg>
|