Skip to content

Commit

Permalink
Fix VPP map not showing up in Safari (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadyan authored Sep 16, 2019
1 parent 0049a6a commit 0339664
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 13 deletions.
6 changes: 0 additions & 6 deletions assets/css/_vehicle_map.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
.m-vehicle-map {
flex: 1 1 auto;
margin-top: 1rem;
min-height: 5rem;
}

.m-vehicle-map__label {
@include font-emph;

Expand Down
12 changes: 12 additions & 0 deletions assets/css/_vehicle_properties_panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@
color: $color-font-warning;
}

.m-vehicle-properties-panel__map {
display: flex;
flex: 1 1 auto;
flex-direction: column;
margin-top: 1rem;
min-height: 5rem;

.m-vehicle-map {
flex: 1 0 auto;
}
}

.m-vehicle-properties-panel__data-discrepancies {
padding: 1rem;
}
Expand Down
1 change: 1 addition & 0 deletions assets/src/components/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ const Map = (props: Props): ReactElement<HTMLDivElement> => {
return (
<div
id="id-vehicle-map"
className="m-vehicle-map"
ref={container => (containerRef.current = container)}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/vehiclePropertiesPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const Location = ({ vehicle }: { vehicle: Vehicle }) => {
Directions
</a>
{!isShuttle(vehicle) && (
<div className="m-vehicle-map">
<div className="m-vehicle-properties-panel__map">
<Map vehicles={[vehicle]} centerOnVehicle={vehicle.id} />
</div>
)}
Expand Down
1 change: 1 addition & 0 deletions assets/tests/components/__snapshots__/map.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

exports[`map renders 1`] = `
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ exports[`Shuttle Map Page renders 1`] = `
}
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down Expand Up @@ -210,6 +211,7 @@ exports[`Shuttle Map Page renders a selected shuttle vehicle 1`] = `
}
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down Expand Up @@ -493,6 +495,7 @@ exports[`Shuttle Map Page renders selected shuttle routes 1`] = `
}
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,10 @@ Array [
Directions
</a>
<div
className="m-vehicle-map"
className="m-vehicle-properties-panel__map"
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down Expand Up @@ -565,9 +566,10 @@ Array [
Directions
</a>
<div
className="m-vehicle-map"
className="m-vehicle-properties-panel__map"
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down Expand Up @@ -858,9 +860,10 @@ Array [
Directions
</a>
<div
className="m-vehicle-map"
className="m-vehicle-properties-panel__map"
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down Expand Up @@ -1441,9 +1444,10 @@ Array [
Directions
</a>
<div
className="m-vehicle-map"
className="m-vehicle-properties-panel__map"
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down Expand Up @@ -1738,9 +1742,10 @@ Array [
Directions
</a>
<div
className="m-vehicle-map"
className="m-vehicle-properties-panel__map"
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down Expand Up @@ -2031,9 +2036,10 @@ Array [
Directions
</a>
<div
className="m-vehicle-map"
className="m-vehicle-properties-panel__map"
>
<div
className="m-vehicle-map"
id="id-vehicle-map"
/>
</div>
Expand Down

0 comments on commit 0339664

Please sign in to comment.