Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: in the single line tab the legend icon was not center #785

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/pages/Map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,28 @@ main > div,
align-items: center;

&-config {
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-left: 1em;
}

&-line {
z-index: -1;
position: absolute;
width: 25px;
height: 4px;
}

&-icon {
width: 20px;
height: 20px;
margin: 0 auto;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
display: flex;

img {
width: 20px;
height: 20px;
}

}

&-title {
Expand Down
8 changes: 4 additions & 4 deletions src/pages/components/map-related/MapIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export function MapIndex({
return (
<div className="map-index-item">
<div className="map-index-item-config">
<p className="map-index-item-line" style={{ backgroundColor: lineColor }}></p>
<p className="map-index-item-icon" style={{ backgroundImage: `url(${imgSrc})` }}>
{/* <img src={imgSrc} alt="planned route stop icon" /> */}
</p>
<div className="map-index-item-icon">
<img src={imgSrc} alt="planned route stop icon" />
</div>
<div className="map-index-item-line" style={{ backgroundColor: lineColor }} />
</div>
<div className="map-index-item-title">
<h3>{title}</h3>
Expand Down
Loading