fix: home map visible on mobile, invalidateSize on both maps
- Explicit height: 40vh on .home-map (not just 100% of parent) so Leaflet can measure the container reliably before CSS inheritance is resolved - align-self: stretch on .home-map-col so it spans full width in flex column - setTimeout invalidateSize(100ms) on home and dailies maps as safety net Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RB86BaJBG3eGiMdfhmHRrQ
This commit is contained in:
@@ -695,7 +695,8 @@ body::after {
|
|||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.home-layout { display: flex; flex-direction: column; }
|
.home-layout { display: flex; flex-direction: column; }
|
||||||
.home-map-col { position: static; height: 40vh; }
|
.home-map-col { position: static; height: 40vh; align-self: stretch; }
|
||||||
|
.home-map { height: 40vh; }
|
||||||
.home-feed-col { padding: var(--space-6) var(--space-5); }
|
.home-feed-col { padding: var(--space-6) var(--space-5); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ if (latLngs.length === 1) {
|
|||||||
} else {
|
} else {
|
||||||
map.fitBounds(L.latLngBounds(latLngs), { padding: [20, 20] });
|
map.fitBounds(L.latLngBounds(latLngs), { padding: [20, 20] });
|
||||||
}
|
}
|
||||||
|
setTimeout(function() { map.invalidateSize(); }, 100);
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ if (latLngs.length === 1) {
|
|||||||
} else {
|
} else {
|
||||||
map.fitBounds(L.latLngBounds(latLngs), { padding: [20, 20] });
|
map.fitBounds(L.latLngBounds(latLngs), { padding: [20, 20] });
|
||||||
}
|
}
|
||||||
|
setTimeout(function() { map.invalidateSize(); }, 100);
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user