|
86 | 86 | class="relative mx-auto my-10 h-fit w-full max-w-5xl origin-bottom transform-[perspective(25px)_rotateX(1deg)_scale3d(1.2,_1.2,_1)] transition-all [scrollbar-width:none] md:my-0 md:-translate-x-20"
|
87 | 87 | use:mousePosition
|
88 | 88 | >
|
89 |
| - {#if browser} |
90 |
| - <svg viewBox={`0 0 ${height * 2} ${height}`}> |
91 |
| - <defs> |
92 |
| - <mask id="map"> |
93 |
| - {#each points as point} |
94 |
| - <ellipse |
95 |
| - cx={point.x} |
96 |
| - cy={point.y} |
97 |
| - rx={radius} |
98 |
| - ry={radius * 1.25} |
99 |
| - fill="white" |
100 |
| - /> |
101 |
| - {/each} |
102 |
| - </mask> |
103 |
| - </defs> |
104 |
| - {#each points as point} |
105 |
| - <ellipse |
106 |
| - cx={point.x} |
107 |
| - cy={point.y} |
108 |
| - rx={radius} |
109 |
| - ry={radius * 1.25} |
110 |
| - fill={theme === 'dark' ? 'rgba(255,255,255,.1)' : '#dadadd'} |
| 89 | + <svg viewBox={`0 0 ${height * 2} ${height}`}> |
| 90 | + {#each points as point} |
| 91 | + <ellipse |
| 92 | + cx={point.x} |
| 93 | + cy={point.y} |
| 94 | + rx={radius} |
| 95 | + ry={radius * 1.25} |
| 96 | + fill={theme === 'dark' ? 'rgba(255,255,255,.1)' : '#dadadd'} |
| 97 | + /> |
| 98 | + {/each} |
| 99 | + {#each markers as marker} |
| 100 | + <g |
| 101 | + role="tooltip" |
| 102 | + class="animate-fade-in outline-none" |
| 103 | + aria-label={`${marker.city} (${marker.code})`} |
| 104 | + onmouseover={() => |
| 105 | + handleSetActiveTooltip( |
| 106 | + marker.city, |
| 107 | + marker.code, |
| 108 | + marker.available, |
| 109 | + marker.date |
| 110 | + )} |
| 111 | + onfocus={() => |
| 112 | + handleSetActiveTooltip( |
| 113 | + marker.city, |
| 114 | + marker.code, |
| 115 | + marker.available, |
| 116 | + marker.date |
| 117 | + )} |
| 118 | + onblur={() => handleResetActiveTooltip()} |
| 119 | + onmouseout={() => handleResetActiveTooltip()} |
| 120 | + data-region={slugify(marker.city)} |
| 121 | + > |
| 122 | + <circle cx={marker.x} cy={marker.y} r={radius * 1.25} class="fill-accent" /> |
| 123 | + <circle cx={marker.x} cy={marker.y} r={radius * 0.5} class="fill-white" /> |
| 124 | + <circle |
| 125 | + cx={marker.x} |
| 126 | + cy={marker.y} |
| 127 | + r={radius * 4} |
| 128 | + class="fill-transparent" |
111 | 129 | />
|
112 |
| - {/each} |
113 |
| - {#each markers as marker} |
114 |
| - <g |
115 |
| - role="tooltip" |
116 |
| - class="animate-fade-in outline-none" |
117 |
| - aria-label={`${marker.city} (${marker.code})`} |
118 |
| - onmouseover={() => |
119 |
| - handleSetActiveTooltip( |
120 |
| - marker.city, |
121 |
| - marker.code, |
122 |
| - marker.available, |
123 |
| - marker.date |
124 |
| - )} |
125 |
| - onfocus={() => |
126 |
| - handleSetActiveTooltip( |
127 |
| - marker.city, |
128 |
| - marker.code, |
129 |
| - marker.available, |
130 |
| - marker.date |
131 |
| - )} |
132 |
| - onblur={() => handleResetActiveTooltip()} |
133 |
| - onmouseout={() => handleResetActiveTooltip()} |
134 |
| - data-region={slugify(marker.city)} |
135 |
| - > |
136 |
| - <circle |
137 |
| - cx={marker.x} |
138 |
| - cy={marker.y} |
139 |
| - r={radius * 1.25} |
140 |
| - class="fill-accent" |
141 |
| - /> |
142 |
| - <circle |
143 |
| - cx={marker.x} |
144 |
| - cy={marker.y} |
145 |
| - r={radius * 0.5} |
146 |
| - class="fill-white" |
147 |
| - /> |
148 |
| - <circle |
149 |
| - cx={marker.x} |
150 |
| - cy={marker.y} |
151 |
| - r={radius * 4} |
152 |
| - class="fill-transparent" |
153 |
| - /> |
154 |
| - </g> |
155 |
| - {/each} |
156 |
| - </svg> |
157 |
| - {/if} |
| 130 | + </g> |
| 131 | + {/each} |
| 132 | + </svg> |
158 | 133 | </div>
|
159 | 134 | </div>
|
160 | 135 | </div>
|
|
0 commit comments