修复地图放大之后消失的BUG
This commit is contained in:
@@ -1997,6 +1997,8 @@ input:checked+.slider:before {
|
||||
backdrop-filter: blur(15px);
|
||||
animation: globeExpand 0.4s cubic-bezier(0.16, 1, 0.3, 1);
|
||||
margin: 0 !important;
|
||||
display: flex !important; /* Force flex for proper internal layout */
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@keyframes globeExpand {
|
||||
@@ -2011,7 +2013,9 @@ input:checked+.slider:before {
|
||||
}
|
||||
|
||||
.globe-card.expanded .globe-body {
|
||||
height: calc(100% - 130px) !important;
|
||||
flex: 1; /* Allow map to fill all remaining space */
|
||||
height: auto !important; /* Override fixed height in expanded state */
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.chart-header-actions {
|
||||
|
||||
@@ -185,10 +185,11 @@
|
||||
dom.globeCard.classList.toggle('expanded');
|
||||
dom.btnExpandGlobe.classList.toggle('active');
|
||||
if (myMap2D) {
|
||||
// Multiple resizes to handle animation frames
|
||||
setTimeout(() => myMap2D.resize(), 50);
|
||||
setTimeout(() => myMap2D.resize(), 150);
|
||||
setTimeout(() => myMap2D.resize(), 400);
|
||||
// Multiple resizes to handle animation phases and final layout
|
||||
myMap2D.resize();
|
||||
setTimeout(() => myMap2D.resize(), 100);
|
||||
setTimeout(() => myMap2D.resize(), 300);
|
||||
setTimeout(() => myMap2D.resize(), 600); // Final resize after animation
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -662,21 +663,30 @@
|
||||
// Add latency routes if configured
|
||||
if (currentLatencies && currentLatencies.length > 0) {
|
||||
const countryCoords = {
|
||||
'China': [116.4074, 39.9042],
|
||||
'United States': [-95.7129, 37.0902],
|
||||
'Japan': [138.2529, 36.2048],
|
||||
'Singapore': [103.8198, 1.3521],
|
||||
'Germany': [10.4515, 51.1657],
|
||||
'United Kingdom': [-3.436, 55.3781],
|
||||
'France': [2.2137, 46.2276],
|
||||
'Hong Kong': [114.1694, 22.3193],
|
||||
'Taiwan': [120.9605, 23.6978],
|
||||
'Korea': [127.7669, 35.9078]
|
||||
'china': [116.4074, 39.9042],
|
||||
'united states': [-95.7129, 37.0902],
|
||||
'us seattle': [-122.3321, 47.6062],
|
||||
'seattle': [-122.3321, 47.6062],
|
||||
'japan': [138.2529, 36.2048],
|
||||
'singapore': [103.8198, 1.3521],
|
||||
'germany': [10.4515, 51.1657],
|
||||
'united kingdom': [-3.436, 55.3781],
|
||||
'france': [2.2137, 46.2276],
|
||||
'hong kong': [114.1694, 22.3193],
|
||||
'taiwan': [120.9605, 23.6978],
|
||||
'south korea': [127.7669, 35.9078],
|
||||
'korea': [127.7669, 35.9078]
|
||||
};
|
||||
|
||||
const getCoords = (name) => {
|
||||
if (countryCoords[name]) return countryCoords[name];
|
||||
const s = servers.find(sv => sv.countryName === name || sv.country === name);
|
||||
const lowerName = (name || '').toLowerCase().trim();
|
||||
if (countryCoords[lowerName]) return countryCoords[lowerName];
|
||||
|
||||
const s = servers.find(sv =>
|
||||
(sv.countryName || '').toLowerCase() === lowerName ||
|
||||
(sv.country || '').toLowerCase() === lowerName ||
|
||||
(sv.city || '').toLowerCase() === lowerName
|
||||
);
|
||||
if (s && s.lng && s.lat) return [s.lng, s.lat];
|
||||
return null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user