Skip to content

Commit

Permalink
fix(map): set container position to relative (#356)
Browse files Browse the repository at this point in the history
Introduction of the intermediate div with #349 indirectly broke relative positioning of elements withing the map-container.

Before that change, elements would be added to a container where position:relative was set by the Maps JavaScript API. This is no longer happening, so we need to set it ourselves.
  • Loading branch information
usefulthink committed May 10, 2024
1 parent 128df87 commit 7fa2b71
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/map/use-map-instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function useMapInstance(
} else {
mapDiv = document.createElement('div');
mapDiv.style.height = '100%';
mapDiv.style.position = 'relative';
container.appendChild(mapDiv);
map = new google.maps.Map(mapDiv, mapOptions);
}
Expand Down

0 comments on commit 7fa2b71

Please sign in to comment.