@tscircuit/schematic-trace-solver 0.0.35 → 0.0.37
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 +3 -0
- package/dist/index.js +46 -14
- package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +13 -0
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver.ts +11 -1
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/geometry.ts +13 -3
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/solvePortOnlyPin.ts +10 -2
- package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +15 -3
- package/lib/types/InputProblem.ts +1 -0
- package/package.json +1 -1
- package/site/examples/example21.page.tsx +177 -0
- package/tests/examples/__snapshots__/example20.snap.svg +235 -0
- package/tests/examples/__snapshots__/example21.snap.svg +272 -0
- package/tests/examples/example20.test.tsx +190 -0
- package/tests/examples/example21.test.tsx +183 -0
|
@@ -0,0 +1,235 @@
|
|
|
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="U3.8
|
|
5
|
+
x-" data-x="-1.4" data-y="0.42500000000000004" cx="220.08485425212754" cy="293.25559941049465" r="3" fill="hsl(88, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="U3.4
|
|
9
|
+
x-" data-x="-1.4" data-y="-0.42500000000000004" cx="220.08485425212754" cy="363.20249325997025" r="3" fill="hsl(84, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="U3.1
|
|
13
|
+
x+" data-x="1.4" data-y="0.5" cx="450.49815163863525" cy="287.08381465907036" r="3" fill="hsl(81, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="U3.6
|
|
17
|
+
x+" data-x="1.4" data-y="0.30000000000000004" cx="450.49815163863525" cy="303.5419073295352" r="3" fill="hsl(86, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="U3.5
|
|
21
|
+
x+" data-x="1.4" data-y="0.10000000000000009" cx="450.49815163863525" cy="320" r="3" fill="hsl(85, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="U3.2
|
|
25
|
+
x+" data-x="1.4" data-y="-0.09999999999999998" cx="450.49815163863525" cy="336.45809267046485" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="U3.3
|
|
29
|
+
x+" data-x="1.4" data-y="-0.3" cx="450.49815163863525" cy="352.9161853409297" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="U3.7
|
|
33
|
+
x+" data-x="1.4" data-y="-0.5" cx="450.49815163863525" cy="369.37427801139455" r="3" fill="hsl(87, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="C20.1
|
|
37
|
+
y+" data-x="-2.3148566499999994" data-y="0.5512093000000002" cx="144.8008766226725" cy="282.86977763412216" r="3" fill="hsl(140, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="C20.2
|
|
41
|
+
y-" data-x="-2.31430995" data-y="-0.5512093000000002" cx="144.84586481898717" cy="373.58831503634275" r="3" fill="hsl(141, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="R11.1
|
|
45
|
+
y+" data-x="1.7580660749999977" data-y="2.3025814000000002" cx="479.96357486113317" cy="138.7485560227891" r="3" fill="hsl(125, 100%, 50%, 0.8)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g>
|
|
48
|
+
<circle data-type="point" data-label="R11.2
|
|
49
|
+
y-" data-x="1.757519574999999" data-y="1.2" cx="479.91860312291124" cy="229.4804903124434" r="3" fill="hsl(126, 100%, 50%, 0.8)" />
|
|
50
|
+
</g>
|
|
51
|
+
<g>
|
|
52
|
+
<circle data-type="point" data-label="R12.1
|
|
53
|
+
y-" data-x="-1.7580660749999977" data-y="-3.3025814000000002" cx="190.61943102962965" cy="600" r="3" fill="hsl(6, 100%, 50%, 0.8)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<circle data-type="point" data-label="R12.2
|
|
57
|
+
y+" data-x="-1.757519574999999" data-y="-2.2" cx="190.66440276785158" cy="509.2680657103457" r="3" fill="hsl(7, 100%, 50%, 0.8)" />
|
|
58
|
+
</g>
|
|
59
|
+
<g>
|
|
60
|
+
<circle data-type="point" data-label="R13.1
|
|
61
|
+
y-" data-x="1.7580660749999977" data-y="-3.3025814000000002" cx="479.96357486113317" cy="600" r="3" fill="hsl(247, 100%, 50%, 0.8)" />
|
|
62
|
+
</g>
|
|
63
|
+
<g>
|
|
64
|
+
<circle data-type="point" data-label="R13.2
|
|
65
|
+
y+" data-x="1.757519574999999" data-y="-2.2" cx="479.91860312291124" cy="509.2680657103457" r="3" fill="hsl(248, 100%, 50%, 0.8)" />
|
|
66
|
+
</g>
|
|
67
|
+
<g>
|
|
68
|
+
<circle data-type="point" data-label="" data-x="-1.8574283249999997" data-y="0.7512093000000004" cx="182.44286543740003" cy="266.4116849636573" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
69
|
+
</g>
|
|
70
|
+
<g>
|
|
71
|
+
<circle data-type="point" data-label="" data-x="1.5790330374999988" data-y="2.5025814000000004" cx="465.23086324988424" cy="122.29046335232425" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
72
|
+
</g>
|
|
73
|
+
<g>
|
|
74
|
+
<circle data-type="point" data-label="" data-x="-2.31430995" data-y="-0.7512093000000004" cx="144.84586481898717" cy="390.0464077068076" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
75
|
+
</g>
|
|
76
|
+
<g>
|
|
77
|
+
<circle data-type="point" data-label="" data-x="1.757519574999999" data-y="0.85" cx="479.91860312291124" cy="258.2821524857569" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
78
|
+
</g>
|
|
79
|
+
<g>
|
|
80
|
+
<circle data-type="point" data-label="" data-x="1.757519574999999" data-y="-2" cx="479.91860312291124" cy="492.80997303988084" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
81
|
+
</g>
|
|
82
|
+
<g>
|
|
83
|
+
<polyline data-points="-2.3148566499999994,0.5512093000000002 -1.4,0.42500000000000004" data-type="line" data-label="" points="144.8008766226725,282.86977763412216 220.08485425212754,293.25559941049465" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1" />
|
|
84
|
+
</g>
|
|
85
|
+
<g>
|
|
86
|
+
<polyline data-points="-2.31430995,-0.5512093000000002 -1.4,-0.42500000000000004" data-type="line" data-label="" points="144.84586481898717,373.58831503634275 220.08485425212754,363.20249325997025" fill="none" stroke="hsl(256, 100%, 50%, 0.8)" stroke-width="1" />
|
|
87
|
+
</g>
|
|
88
|
+
<g>
|
|
89
|
+
<polyline data-points="1.757519574999999,1.2 1.4,0.5" data-type="line" data-label="" points="479.91860312291124,229.4804903124434 450.49815163863525,287.08381465907036" fill="none" stroke="hsl(144, 100%, 50%, 0.8)" stroke-width="1" />
|
|
90
|
+
</g>
|
|
91
|
+
<g>
|
|
92
|
+
<polyline data-points="1.757519574999999,-2.2 -1.757519574999999,-2.2" data-type="line" data-label="" points="479.91860312291124,509.2680657103457 190.66440276785158,509.2680657103457" fill="none" stroke="hsl(144, 100%, 50%, 0.8)" stroke-width="1" />
|
|
93
|
+
</g>
|
|
94
|
+
<g>
|
|
95
|
+
<polyline data-points="-1.4,0.42500000000000004 1.4,-0.3" data-type="line" data-label="" points="220.08485425212754,293.25559941049465 450.49815163863525,352.9161853409297" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
96
|
+
</g>
|
|
97
|
+
<g>
|
|
98
|
+
<polyline data-points="-1.4,0.42500000000000004 1.4,-0.5" data-type="line" data-label="" points="220.08485425212754,293.25559941049465 450.49815163863525,369.37427801139455" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
99
|
+
</g>
|
|
100
|
+
<g>
|
|
101
|
+
<polyline data-points="-1.4,0.42500000000000004 -2.3148566499999994,0.5512093000000002" data-type="line" data-label="" points="220.08485425212754,293.25559941049465 144.8008766226725,282.86977763412216" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
102
|
+
</g>
|
|
103
|
+
<g>
|
|
104
|
+
<polyline data-points="-1.4,0.42500000000000004 1.7580660749999977,2.3025814000000002" data-type="line" data-label="" points="220.08485425212754,293.25559941049465 479.96357486113317,138.7485560227891" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
105
|
+
</g>
|
|
106
|
+
<g>
|
|
107
|
+
<polyline data-points="1.4,-0.3 1.4,-0.5" data-type="line" data-label="" points="450.49815163863525,352.9161853409297 450.49815163863525,369.37427801139455" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
108
|
+
</g>
|
|
109
|
+
<g>
|
|
110
|
+
<polyline data-points="1.4,-0.3 -2.3148566499999994,0.5512093000000002" data-type="line" data-label="" points="450.49815163863525,352.9161853409297 144.8008766226725,282.86977763412216" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
111
|
+
</g>
|
|
112
|
+
<g>
|
|
113
|
+
<polyline data-points="1.4,-0.3 1.7580660749999977,2.3025814000000002" data-type="line" data-label="" points="450.49815163863525,352.9161853409297 479.96357486113317,138.7485560227891" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
114
|
+
</g>
|
|
115
|
+
<g>
|
|
116
|
+
<polyline data-points="1.4,-0.5 -2.3148566499999994,0.5512093000000002" data-type="line" data-label="" points="450.49815163863525,369.37427801139455 144.8008766226725,282.86977763412216" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
117
|
+
</g>
|
|
118
|
+
<g>
|
|
119
|
+
<polyline data-points="1.4,-0.5 1.7580660749999977,2.3025814000000002" data-type="line" data-label="" points="450.49815163863525,369.37427801139455 479.96357486113317,138.7485560227891" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
120
|
+
</g>
|
|
121
|
+
<g>
|
|
122
|
+
<polyline data-points="-2.3148566499999994,0.5512093000000002 1.7580660749999977,2.3025814000000002" data-type="line" data-label="" points="144.8008766226725,282.86977763412216 479.96357486113317,138.7485560227891" fill="none" stroke="hsl(73, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
123
|
+
</g>
|
|
124
|
+
<g>
|
|
125
|
+
<polyline data-points="-1.4,-0.42500000000000004 -2.31430995,-0.5512093000000002" data-type="line" data-label="" points="220.08485425212754,363.20249325997025 144.84586481898717,373.58831503634275" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
126
|
+
</g>
|
|
127
|
+
<g>
|
|
128
|
+
<polyline data-points="1.4,0.5 1.757519574999999,1.2" data-type="line" data-label="" points="450.49815163863525,287.08381465907036 479.91860312291124,229.4804903124434" fill="none" stroke="hsl(304, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
129
|
+
</g>
|
|
130
|
+
<g>
|
|
131
|
+
<polyline data-points="-1.4,0.42500000000000004 -1.8574283249999997,0.42500000000000004 -1.8574283249999997,0.7512093000000004 -2.3148566499999994,0.7512093000000004 -2.3148566499999994,0.5512093000000002" data-type="line" data-label="" points="220.08485425212754,293.25559941049465 182.44286543740003,293.25559941049465 182.44286543740003,266.4116849636573 144.8008766226725,266.4116849636573 144.8008766226725,282.86977763412216" fill="none" stroke="purple" stroke-width="1" />
|
|
132
|
+
</g>
|
|
133
|
+
<g>
|
|
134
|
+
<polyline data-points="1.4,-0.3 1.5790330374999988,-0.3 1.5790330374999988,2.5025814000000004 1.7580660749999977,2.5025814000000004 1.7580660749999977,2.3025814000000002" data-type="line" data-label="" points="450.49815163863525,352.9161853409297 465.23086324988424,352.9161853409297 465.23086324988424,122.29046335232425 479.96357486113317,122.29046335232425 479.96357486113317,138.7485560227891" fill="none" stroke="purple" stroke-width="1" />
|
|
135
|
+
</g>
|
|
136
|
+
<g>
|
|
137
|
+
<polyline data-points="1.4,-0.5 1.5999999999999999,-0.5 1.5999999999999999,-0.3 1.4,-0.3" data-type="line" data-label="" points="450.49815163863525,369.37427801139455 466.9562443091001,369.37427801139455 466.9562443091001,352.9161853409297 450.49815163863525,352.9161853409297" fill="none" stroke="purple" stroke-width="1" />
|
|
138
|
+
</g>
|
|
139
|
+
<g>
|
|
140
|
+
<polyline data-points="-2.31430995,-0.5512093000000002 -2.31430995,-0.7512093000000004 -1.857154975,-0.7512093000000004 -1.857154975,-0.42500000000000004 -1.4,-0.42500000000000004" data-type="line" data-label="" points="144.84586481898717,373.58831503634275 144.84586481898717,390.0464077068076 182.46535953555735,390.0464077068076 182.46535953555735,363.20249325997025 220.08485425212754,363.20249325997025" fill="none" stroke="purple" stroke-width="1" />
|
|
141
|
+
</g>
|
|
142
|
+
<g>
|
|
143
|
+
<polyline data-points="1.757519574999999,1.2 1.757519574999999,0.5 1.4,0.5" data-type="line" data-label="" points="479.91860312291124,229.4804903124434 479.91860312291124,287.08381465907036 450.49815163863525,287.08381465907036" fill="none" stroke="purple" stroke-width="1" />
|
|
144
|
+
</g>
|
|
145
|
+
<g>
|
|
146
|
+
<polyline data-points="1.757519574999999,-2.2 1.757519574999999,-2 -1.757519574999999,-2 -1.757519574999999,-2.2" data-type="line" data-label="" points="479.91860312291124,509.2680657103457 479.91860312291124,492.80997303988084 190.66440276785158,492.80997303988084 190.66440276785158,509.2680657103457" fill="none" stroke="purple" stroke-width="1" />
|
|
147
|
+
</g>
|
|
148
|
+
<g>
|
|
149
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="220.08485425212754" y="270.6257219886055" width="230.4132973865077" height="115.2066486932539" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.012152076428571431" />
|
|
150
|
+
</g>
|
|
151
|
+
<g>
|
|
152
|
+
<rect data-type="rect" data-label="schematic_component_1" data-x="-2.3145833" data-y="0" x="123.05068836854284" y="282.86977763412216" width="43.545364704573984" height="90.71853740222059" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.012152076428571431" />
|
|
153
|
+
</g>
|
|
154
|
+
<g>
|
|
155
|
+
<rect data-type="rect" data-label="schematic_component_2" data-x="1.7577928249999983" data-y="1.7512907000000002" x="466.95624430910016" y="138.7485560227891" width="25.96968936584409" height="90.7319342896543" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.012152076428571431" />
|
|
156
|
+
</g>
|
|
157
|
+
<g>
|
|
158
|
+
<rect data-type="rect" data-label="schematic_component_3" data-x="-1.7577928249999983" data-y="-2.7512907" x="177.65707221581857" y="509.2680657103457" width="25.96968936584412" height="90.7319342896543" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.012152076428571431" />
|
|
159
|
+
</g>
|
|
160
|
+
<g>
|
|
161
|
+
<rect data-type="rect" data-label="schematic_component_4" data-x="1.7577928249999983" data-y="-2.7512907" x="466.95624430910016" y="509.2680657103457" width="25.96968936584409" height="90.7319342896543" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.012152076428571431" />
|
|
162
|
+
</g>
|
|
163
|
+
<g>
|
|
164
|
+
<rect data-type="rect" data-label="" data-x="-1.8574283249999997" data-y="1.2512093000000004" x="174.2138191021676" y="184.1212216113331" width="16.45809267046485" height="82.2904633523242" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.012152076428571431" />
|
|
165
|
+
</g>
|
|
166
|
+
<g>
|
|
167
|
+
<rect data-type="rect" data-label="" data-x="1.5790330374999988" data-y="3.0025814000000004" x="457.0018169146518" y="40.00000000000006" width="16.45809267046485" height="82.2904633523242" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.012152076428571431" />
|
|
168
|
+
</g>
|
|
169
|
+
<g>
|
|
170
|
+
<rect data-type="rect" data-label="" data-x="-2.31430995" data-y="-1.1512093000000005" x="136.61681848375474" y="390.0464077068076" width="16.45809267046485" height="65.83237068185935" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.012152076428571431" />
|
|
171
|
+
</g>
|
|
172
|
+
<g>
|
|
173
|
+
<rect data-type="rect" data-label="" data-x="1.807519574999999" data-y="0.85" x="479.91860312291124" y="250.05310615052446" width="8.229046335232397" height="16.45809267046485" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.012152076428571431" />
|
|
174
|
+
</g>
|
|
175
|
+
<g>
|
|
176
|
+
<rect data-type="rect" data-label="" data-x="1.982519574999999" data-y="-2" x="479.91860312291124" y="484.5809267046484" width="37.0307085085459" height="16.458092670464907" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.012152076428571431" />
|
|
177
|
+
</g>
|
|
178
|
+
<g id="crosshair" style="display: none">
|
|
179
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
180
|
+
<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>
|
|
181
|
+
</g>
|
|
182
|
+
<script>
|
|
183
|
+
<![CDATA[
|
|
184
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
185
|
+
const svg = e.currentTarget;
|
|
186
|
+
const rect = svg.getBoundingClientRect();
|
|
187
|
+
const x = e.clientX - rect.left;
|
|
188
|
+
const y = e.clientY - rect.top;
|
|
189
|
+
const crosshair = svg.getElementById('crosshair');
|
|
190
|
+
const h = svg.getElementById('crosshair-h');
|
|
191
|
+
const v = svg.getElementById('crosshair-v');
|
|
192
|
+
const coords = svg.getElementById('coordinates');
|
|
193
|
+
|
|
194
|
+
crosshair.style.display = 'block';
|
|
195
|
+
h.setAttribute('x1', '0');
|
|
196
|
+
h.setAttribute('x2', '640');
|
|
197
|
+
h.setAttribute('y1', y);
|
|
198
|
+
h.setAttribute('y2', y);
|
|
199
|
+
v.setAttribute('x1', x);
|
|
200
|
+
v.setAttribute('x2', x);
|
|
201
|
+
v.setAttribute('y1', '0');
|
|
202
|
+
v.setAttribute('y2', '640');
|
|
203
|
+
|
|
204
|
+
// Calculate real coordinates using inverse transformation
|
|
205
|
+
const matrix = {
|
|
206
|
+
"a": 82.2904633523242,
|
|
207
|
+
"c": 0,
|
|
208
|
+
"e": 335.2915029453814,
|
|
209
|
+
"b": 0,
|
|
210
|
+
"d": -82.2904633523242,
|
|
211
|
+
"f": 328.22904633523245
|
|
212
|
+
};
|
|
213
|
+
// Manually invert and apply the affine transform
|
|
214
|
+
// Since we only use translate and scale, we can directly compute:
|
|
215
|
+
// x' = (x - tx) / sx
|
|
216
|
+
// y' = (y - ty) / sy
|
|
217
|
+
const sx = matrix.a;
|
|
218
|
+
const sy = matrix.d;
|
|
219
|
+
const tx = matrix.e;
|
|
220
|
+
const ty = matrix.f;
|
|
221
|
+
const realPoint = {
|
|
222
|
+
x: (x - tx) / sx,
|
|
223
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
227
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
228
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
229
|
+
});
|
|
230
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
231
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
232
|
+
});
|
|
233
|
+
]]>
|
|
234
|
+
</script>
|
|
235
|
+
</svg>
|
|
@@ -0,0 +1,272 @@
|
|
|
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="CORNERS.1
|
|
5
|
+
x-" data-x="-1.4" data-y="-0.6" cx="59.450726978998375" cy="310.27463651050084" r="3" fill="hsl(65, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="CORNERS.2
|
|
9
|
+
x-" data-x="-1.4" data-y="0.6" cx="59.450726978998375" cy="232.7302100161551" r="3" fill="hsl(66, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="CORNERS.3
|
|
13
|
+
x+" data-x="1.4" data-y="0.6" cx="240.3877221324717" cy="232.7302100161551" r="3" fill="hsl(67, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="CORNERS.4
|
|
17
|
+
x+" data-x="1.4" data-y="-0.6" cx="240.3877221324717" cy="310.27463651050084" r="3" fill="hsl(68, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="U100.1
|
|
21
|
+
x-" data-x="3.785" data-y="-0.29999999999999993" cx="394.50726978998387" cy="290.8885298869144" r="3" fill="hsl(175, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="U100.2
|
|
25
|
+
y-" data-x="4.785" data-y="-1.2999999999999998" cx="459.1276252019386" cy="355.50888529886913" r="3" fill="hsl(176, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="U100.3
|
|
29
|
+
x-" data-x="3.785" data-y="-0.4999999999999999" cx="394.50726978998387" cy="303.8126009693053" r="3" fill="hsl(177, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="U100.5
|
|
33
|
+
x+" data-x="5.785" data-y="-0.3999999999999999" cx="523.7479806138933" cy="297.35056542810986" r="3" fill="hsl(179, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="C101.1
|
|
37
|
+
y+" data-x="6.7" data-y="-0.39999999999999925" cx="582.8756058158319" cy="297.3505654281098" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="C101.2
|
|
41
|
+
y-" data-x="6.7" data-y="-1.4999999999999993" cx="582.8756058158319" cy="368.43295638126006" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="C100.1
|
|
45
|
+
y+" data-x="2.8699999999999997" data-y="-1.2" cx="335.37964458804515" cy="349.04684975767367" r="3" fill="hsl(337, 100%, 50%, 0.8)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g>
|
|
48
|
+
<circle data-type="point" data-label="C100.2
|
|
49
|
+
y-" data-x="2.8699999999999997" data-y="-2.3" cx="335.37964458804515" cy="420.12924071082386" r="3" fill="hsl(338, 100%, 50%, 0.8)" />
|
|
50
|
+
</g>
|
|
51
|
+
<g>
|
|
52
|
+
<circle data-type="point" data-label="R100.1
|
|
53
|
+
y+" data-x="2.9752723250000006" data-y="0.6000000000000003" cx="342.1823796445881" cy="232.73021001615507" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<circle data-type="point" data-label="R100.2
|
|
57
|
+
y-" data-x="2.9752723250000006" data-y="-0.4999999999999998" cx="342.1823796445881" cy="303.8126009693053" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
|
|
58
|
+
</g>
|
|
59
|
+
<g>
|
|
60
|
+
<circle data-type="point" data-label="" data-x="-1.4" data-y="-0.6" cx="59.450726978998375" cy="310.27463651050084" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
61
|
+
</g>
|
|
62
|
+
<g>
|
|
63
|
+
<circle data-type="point" data-label="" data-x="1.4" data-y="-0.6" cx="240.3877221324717" cy="310.27463651050084" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
64
|
+
</g>
|
|
65
|
+
<g>
|
|
66
|
+
<circle data-type="point" data-label="" data-x="4.785" data-y="-1.6999999999999993" cx="459.1276252019386" cy="381.357027463651" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
67
|
+
</g>
|
|
68
|
+
<g>
|
|
69
|
+
<circle data-type="point" data-label="" data-x="2.8699999999999997" data-y="-2.3" cx="335.37964458804515" cy="420.12924071082386" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
70
|
+
</g>
|
|
71
|
+
<g>
|
|
72
|
+
<circle data-type="point" data-label="" data-x="2.8699999999999997" data-y="-1.2" cx="335.37964458804515" cy="349.04684975767367" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
73
|
+
</g>
|
|
74
|
+
<g>
|
|
75
|
+
<circle data-type="point" data-label="" data-x="2.9752723250000006" data-y="0.8000000000000005" cx="342.1823796445881" cy="219.80613893376412" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
76
|
+
</g>
|
|
77
|
+
<g>
|
|
78
|
+
<circle data-type="point" data-label="" data-x="-1.4" data-y="0.6" cx="59.450726978998375" cy="232.7302100161551" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
79
|
+
</g>
|
|
80
|
+
<g>
|
|
81
|
+
<circle data-type="point" data-label="" data-x="6.2425" data-y="-0.19999999999999923" cx="553.3117932148626" cy="284.4264943457189" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
82
|
+
</g>
|
|
83
|
+
<g>
|
|
84
|
+
<circle data-type="point" data-label="" data-x="1.4" data-y="0.6" cx="240.3877221324717" cy="232.7302100161551" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
85
|
+
</g>
|
|
86
|
+
<g>
|
|
87
|
+
<circle data-type="point" data-label="" data-x="2.9752723250000006" data-y="-0.5999999999999999" cx="342.1823796445881" cy="310.2746365105008" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
88
|
+
</g>
|
|
89
|
+
<g>
|
|
90
|
+
<polyline data-points="6.7,-0.39999999999999925 5.785,-0.3999999999999999" data-type="line" data-label="" points="582.8756058158319,297.3505654281098 523.7479806138933,297.35056542810986" fill="none" stroke="hsl(176, 100%, 50%, 0.8)" stroke-width="1" />
|
|
91
|
+
</g>
|
|
92
|
+
<g>
|
|
93
|
+
<polyline data-points="2.8699999999999997,-1.2 3.785,-0.29999999999999993" data-type="line" data-label="" points="335.37964458804515,349.04684975767367 394.50726978998387,290.8885298869144" fill="none" stroke="hsl(8, 100%, 50%, 0.8)" stroke-width="1" />
|
|
94
|
+
</g>
|
|
95
|
+
<g>
|
|
96
|
+
<polyline data-points="2.9752723250000006,-0.4999999999999998 3.785,-0.4999999999999999" data-type="line" data-label="" points="342.1823796445881,303.8126009693053 394.50726978998387,303.8126009693053" fill="none" stroke="hsl(272, 100%, 50%, 0.8)" stroke-width="1" />
|
|
97
|
+
</g>
|
|
98
|
+
<g>
|
|
99
|
+
<polyline data-points="-1.4,-0.6 1.4,-0.6" data-type="line" data-label="" points="59.450726978998375,310.27463651050084 240.3877221324717,310.27463651050084" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
100
|
+
</g>
|
|
101
|
+
<g>
|
|
102
|
+
<polyline data-points="-1.4,-0.6 4.785,-1.2999999999999998" data-type="line" data-label="" points="59.450726978998375,310.27463651050084 459.1276252019386,355.50888529886913" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
103
|
+
</g>
|
|
104
|
+
<g>
|
|
105
|
+
<polyline data-points="-1.4,-0.6 6.7,-1.4999999999999993" data-type="line" data-label="" points="59.450726978998375,310.27463651050084 582.8756058158319,368.43295638126006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
106
|
+
</g>
|
|
107
|
+
<g>
|
|
108
|
+
<polyline data-points="-1.4,-0.6 2.8699999999999997,-2.3" data-type="line" data-label="" points="59.450726978998375,310.27463651050084 335.37964458804515,420.12924071082386" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
109
|
+
</g>
|
|
110
|
+
<g>
|
|
111
|
+
<polyline data-points="1.4,-0.6 4.785,-1.2999999999999998" data-type="line" data-label="" points="240.3877221324717,310.27463651050084 459.1276252019386,355.50888529886913" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
112
|
+
</g>
|
|
113
|
+
<g>
|
|
114
|
+
<polyline data-points="1.4,-0.6 6.7,-1.4999999999999993" data-type="line" data-label="" points="240.3877221324717,310.27463651050084 582.8756058158319,368.43295638126006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
115
|
+
</g>
|
|
116
|
+
<g>
|
|
117
|
+
<polyline data-points="1.4,-0.6 2.8699999999999997,-2.3" data-type="line" data-label="" points="240.3877221324717,310.27463651050084 335.37964458804515,420.12924071082386" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
118
|
+
</g>
|
|
119
|
+
<g>
|
|
120
|
+
<polyline data-points="4.785,-1.2999999999999998 6.7,-1.4999999999999993" data-type="line" data-label="" points="459.1276252019386,355.50888529886913 582.8756058158319,368.43295638126006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
121
|
+
</g>
|
|
122
|
+
<g>
|
|
123
|
+
<polyline data-points="4.785,-1.2999999999999998 2.8699999999999997,-2.3" data-type="line" data-label="" points="459.1276252019386,355.50888529886913 335.37964458804515,420.12924071082386" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
124
|
+
</g>
|
|
125
|
+
<g>
|
|
126
|
+
<polyline data-points="6.7,-1.4999999999999993 2.8699999999999997,-2.3" data-type="line" data-label="" points="582.8756058158319,368.43295638126006 335.37964458804515,420.12924071082386" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
127
|
+
</g>
|
|
128
|
+
<g>
|
|
129
|
+
<polyline data-points="-1.4,0.6 3.785,-0.29999999999999993" data-type="line" data-label="" points="59.450726978998375,232.7302100161551 394.50726978998387,290.8885298869144" fill="none" stroke="hsl(27, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
130
|
+
</g>
|
|
131
|
+
<g>
|
|
132
|
+
<polyline data-points="-1.4,0.6 2.8699999999999997,-1.2" data-type="line" data-label="" points="59.450726978998375,232.7302100161551 335.37964458804515,349.04684975767367" fill="none" stroke="hsl(27, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
133
|
+
</g>
|
|
134
|
+
<g>
|
|
135
|
+
<polyline data-points="-1.4,0.6 2.9752723250000006,0.6000000000000003" data-type="line" data-label="" points="59.450726978998375,232.7302100161551 342.1823796445881,232.73021001615507" fill="none" stroke="hsl(27, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
136
|
+
</g>
|
|
137
|
+
<g>
|
|
138
|
+
<polyline data-points="3.785,-0.29999999999999993 2.8699999999999997,-1.2" data-type="line" data-label="" points="394.50726978998387,290.8885298869144 335.37964458804515,349.04684975767367" fill="none" stroke="hsl(27, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
139
|
+
</g>
|
|
140
|
+
<g>
|
|
141
|
+
<polyline data-points="3.785,-0.29999999999999993 2.9752723250000006,0.6000000000000003" data-type="line" data-label="" points="394.50726978998387,290.8885298869144 342.1823796445881,232.73021001615507" fill="none" stroke="hsl(27, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
142
|
+
</g>
|
|
143
|
+
<g>
|
|
144
|
+
<polyline data-points="2.8699999999999997,-1.2 2.9752723250000006,0.6000000000000003" data-type="line" data-label="" points="335.37964458804515,349.04684975767367 342.1823796445881,232.73021001615507" fill="none" stroke="hsl(27, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
145
|
+
</g>
|
|
146
|
+
<g>
|
|
147
|
+
<polyline data-points="1.4,0.6 5.785,-0.3999999999999999" data-type="line" data-label="" points="240.3877221324717,232.7302100161551 523.7479806138933,297.35056542810986" fill="none" stroke="hsl(64, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
148
|
+
</g>
|
|
149
|
+
<g>
|
|
150
|
+
<polyline data-points="1.4,0.6 6.7,-0.39999999999999925" data-type="line" data-label="" points="240.3877221324717,232.7302100161551 582.8756058158319,297.3505654281098" fill="none" stroke="hsl(64, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
151
|
+
</g>
|
|
152
|
+
<g>
|
|
153
|
+
<polyline data-points="5.785,-0.3999999999999999 6.7,-0.39999999999999925" data-type="line" data-label="" points="523.7479806138933,297.35056542810986 582.8756058158319,297.3505654281098" fill="none" stroke="hsl(64, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
154
|
+
</g>
|
|
155
|
+
<g>
|
|
156
|
+
<polyline data-points="3.785,-0.4999999999999999 2.9752723250000006,-0.4999999999999998" data-type="line" data-label="" points="394.50726978998387,303.8126009693053 342.1823796445881,303.8126009693053" fill="none" stroke="hsl(345, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
157
|
+
</g>
|
|
158
|
+
<g>
|
|
159
|
+
<polyline data-points="5.785,-0.3999999999999999 6.2425,-0.3999999999999999 6.2425,-0.19999999999999923 6.7,-0.19999999999999923 6.7,-0.39999999999999925" data-type="line" data-label="" points="523.7479806138933,297.35056542810986 553.3117932148626,297.35056542810986 553.3117932148626,284.4264943457189 582.8756058158319,284.4264943457189 582.8756058158319,297.3505654281098" fill="none" stroke="purple" stroke-width="1" />
|
|
160
|
+
</g>
|
|
161
|
+
<g>
|
|
162
|
+
<polyline data-points="2.9752723250000006,0.6000000000000003 2.9752723250000006,0.8000000000000005 3.3801361625000004,0.8000000000000005 3.3801361625000004,-0.30000000000000004 3.785,-0.30000000000000004" data-type="line" data-label="" points="342.1823796445881,232.73021001615507 342.1823796445881,219.80613893376412 368.344824717286,219.80613893376412 368.344824717286,290.8885298869144 394.50726978998387,290.8885298869144" fill="none" stroke="purple" stroke-width="1" />
|
|
163
|
+
</g>
|
|
164
|
+
<g>
|
|
165
|
+
<polyline data-points="2.9752723250000006,-0.4999999999999998 2.9752723250000006,-0.7 3.585,-0.7 3.585,-0.4999999999999998 3.785,-0.4999999999999998" data-type="line" data-label="" points="342.1823796445881,303.8126009693053 342.1823796445881,316.7366720516963 381.5831987075928,316.7366720516963 381.5831987075928,303.8126009693053 394.50726978998387,303.8126009693053" fill="none" stroke="purple" stroke-width="1" />
|
|
166
|
+
</g>
|
|
167
|
+
<g>
|
|
168
|
+
<polyline data-points="4.785,-1.2999999999999998 4.785,-1.6999999999999993 6.7,-1.6999999999999993 6.7,-1.4999999999999991" data-type="line" data-label="" points="459.1276252019386,355.50888529886913 459.1276252019386,381.357027463651 582.8756058158319,381.357027463651 582.8756058158319,368.43295638126006" fill="none" stroke="purple" stroke-width="1" />
|
|
169
|
+
</g>
|
|
170
|
+
<g>
|
|
171
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="59.450726978998375" y="206.8820678513732" width="180.93699515347333" height="129.2407108239095" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.015475000000000001" />
|
|
172
|
+
</g>
|
|
173
|
+
<g>
|
|
174
|
+
<rect data-type="rect" data-label="schematic_component_1" data-x="4.785" data-y="-0.3999999999999999" x="394.50726978998387" y="239.1922455573506" width="129.24071082390947" height="116.31663974151854" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.015475000000000001" />
|
|
175
|
+
</g>
|
|
176
|
+
<g>
|
|
177
|
+
<rect data-type="rect" data-label="schematic_component_2" data-x="6.7" data-y="-0.9499999999999993" x="565.751211631664" y="297.3505654281098" width="34.24878836833602" height="71.08239095315025" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.015475000000000001" />
|
|
178
|
+
</g>
|
|
179
|
+
<g>
|
|
180
|
+
<rect data-type="rect" data-label="schematic_component_3" data-x="2.8699999999999997" data-y="-1.75" x="318.2552504038772" y="349.04684975767367" width="34.24878836833602" height="71.0823909531502" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.015475000000000001" />
|
|
181
|
+
</g>
|
|
182
|
+
<g>
|
|
183
|
+
<rect data-type="rect" data-label="schematic_component_4" data-x="2.9752723250000006" data-y="0.050000000000000266" x="331.8607205169629" y="232.73021001615507" width="20.643318255250335" height="71.08239095315025" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.015475000000000001" />
|
|
184
|
+
</g>
|
|
185
|
+
<g>
|
|
186
|
+
<rect data-type="rect" data-label="" data-x="-1.5509999999999997" data-y="-0.6" x="40.000000000000014" y="303.8126009693053" width="19.386106623586414" height="12.92407108239098" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
187
|
+
</g>
|
|
188
|
+
<g>
|
|
189
|
+
<rect data-type="rect" data-label="" data-x="1.5509999999999997" data-y="-0.6" x="240.45234248788364" y="303.8126009693053" width="19.386106623586443" height="12.92407108239098" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
190
|
+
</g>
|
|
191
|
+
<g>
|
|
192
|
+
<rect data-type="rect" data-label="" data-x="4.785" data-y="-1.8499999999999992" x="452.6655896607431" y="381.357027463651" width="12.924071082390924" height="19.386106623586443" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
193
|
+
</g>
|
|
194
|
+
<g>
|
|
195
|
+
<rect data-type="rect" data-label="" data-x="2.8699999999999997" data-y="-2.4509999999999996" x="328.9176090468497" y="420.19386106623585" width="12.92407108239098" height="19.386106623586443" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
196
|
+
</g>
|
|
197
|
+
<g>
|
|
198
|
+
<rect data-type="rect" data-label="" data-x="2.8699999999999997" data-y="-1.0490000000000002" x="328.9176090468497" y="329.5961227786753" width="12.92407108239098" height="19.386106623586443" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
199
|
+
</g>
|
|
200
|
+
<g>
|
|
201
|
+
<rect data-type="rect" data-label="" data-x="2.9752723250000006" data-y="0.9500000000000005" x="335.72034410339256" y="200.4200323101777" width="12.92407108239098" height="19.386106623586414" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
202
|
+
</g>
|
|
203
|
+
<g>
|
|
204
|
+
<rect data-type="rect" data-label="" data-x="-1.5509999999999997" data-y="0.6" x="40.000000000000014" y="226.2681744749596" width="19.386106623586414" height="12.92407108239098" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
205
|
+
</g>
|
|
206
|
+
<g>
|
|
207
|
+
<rect data-type="rect" data-label="" data-x="6.2425" data-y="7.771561172376096e-16" x="546.8497576736672" y="258.578352180937" width="12.92407108239081" height="25.848142164781905" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
208
|
+
</g>
|
|
209
|
+
<g>
|
|
210
|
+
<rect data-type="rect" data-label="" data-x="1.6009999999999998" data-y="0.6" x="240.45234248788364" y="226.2681744749596" width="25.848142164781905" height="12.92407108239098" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
211
|
+
</g>
|
|
212
|
+
<g>
|
|
213
|
+
<rect data-type="rect" data-label="" data-x="2.675272325000001" data-y="-0.5999999999999999" x="303.4101663974152" y="303.8126009693053" width="38.772213247172886" height="12.92407108239098" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.015475000000000001" />
|
|
214
|
+
</g>
|
|
215
|
+
<g id="crosshair" style="display: none">
|
|
216
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
217
|
+
<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>
|
|
218
|
+
</g>
|
|
219
|
+
<script>
|
|
220
|
+
<![CDATA[
|
|
221
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
222
|
+
const svg = e.currentTarget;
|
|
223
|
+
const rect = svg.getBoundingClientRect();
|
|
224
|
+
const x = e.clientX - rect.left;
|
|
225
|
+
const y = e.clientY - rect.top;
|
|
226
|
+
const crosshair = svg.getElementById('crosshair');
|
|
227
|
+
const h = svg.getElementById('crosshair-h');
|
|
228
|
+
const v = svg.getElementById('crosshair-v');
|
|
229
|
+
const coords = svg.getElementById('coordinates');
|
|
230
|
+
|
|
231
|
+
crosshair.style.display = 'block';
|
|
232
|
+
h.setAttribute('x1', '0');
|
|
233
|
+
h.setAttribute('x2', '640');
|
|
234
|
+
h.setAttribute('y1', y);
|
|
235
|
+
h.setAttribute('y2', y);
|
|
236
|
+
v.setAttribute('x1', x);
|
|
237
|
+
v.setAttribute('x2', x);
|
|
238
|
+
v.setAttribute('y1', '0');
|
|
239
|
+
v.setAttribute('y2', '640');
|
|
240
|
+
|
|
241
|
+
// Calculate real coordinates using inverse transformation
|
|
242
|
+
const matrix = {
|
|
243
|
+
"a": 64.62035541195476,
|
|
244
|
+
"c": 0,
|
|
245
|
+
"e": 149.91922455573504,
|
|
246
|
+
"b": 0,
|
|
247
|
+
"d": -64.62035541195476,
|
|
248
|
+
"f": 271.50242326332796
|
|
249
|
+
};
|
|
250
|
+
// Manually invert and apply the affine transform
|
|
251
|
+
// Since we only use translate and scale, we can directly compute:
|
|
252
|
+
// x' = (x - tx) / sx
|
|
253
|
+
// y' = (y - ty) / sy
|
|
254
|
+
const sx = matrix.a;
|
|
255
|
+
const sy = matrix.d;
|
|
256
|
+
const tx = matrix.e;
|
|
257
|
+
const ty = matrix.f;
|
|
258
|
+
const realPoint = {
|
|
259
|
+
x: (x - tx) / sx,
|
|
260
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
264
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
265
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
266
|
+
});
|
|
267
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
268
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
269
|
+
});
|
|
270
|
+
]]>
|
|
271
|
+
</script>
|
|
272
|
+
</svg>
|