orchidmap-front/src/styles/map.less
2020-01-17 17:26:13 +07:00

346 lines
5.6 KiB
Text

#map {
width: 50% !important;
height: 100%;
position: absolute;
z-index: 1;
left: 0;
top: 0;
cursor: crosshair;
}
.leaflet-control-zoom {
display: none;
}
.leaflet-touch .leaflet-bar a {
border-radius: @panel_radius !important;
}
@keyframes vertex_spin {
0% {
transform: scale(1);
}
100% {
transform: scale(1.2);
}
}
.leaflet-vertex-drag-helper {
pointer-events: none !important;
background: fade(red, 50%);
border-radius: 12px;
&::after {
content: ' ';
width: 24px;
height: 24px;
border: 2px solid @red_secondary;
border-radius: 24px;
position: absolute;
top: -9px;
left: -9px;
animation: vertex_spin 500ms infinite linear alternate;
}
}
.vertex-icon-mixin(@left, @right) {
&::after {
content: ' ';
position: absolute;
top: 4px;
left: @left;
right: @right;
width: 8px;
height: 8px;
background: white;
border-radius: 8px;
transform: scale(1);
transition: transform 150ms;
}
}
.leaflet-vertex-icon {
outline: none !important;
border-radius: 10px;
opacity: 1;
border: none;
width: 16px !important;
height: 16px !important;
margin-left: -8px !important;
margin-top: -8px !important;
background: transparent;
position: absolute;
cursor: grab;
&::before {
width: 24px;
height: 24px;
background: none;
content: ' ';
position: absolute;
transform: translate(-4px, -4px);
border-radius: 16px;
top: 0;
left: 0;
}
@media (max-width: @mobile_breakpoint) {
&::before {
width: 32px;
height: 32px;
transform: translate(-8px, -8px);
background: rgba(255, 50, 0, 0.3);
}
}
.vertex-icon-mixin(4px, auto);
&:hover {
opacity: 1;
}
}
.leaflet-arrow {
position: absolute;
left: -18px;
top: -18px;
width: 48px;
height: 48px;
pointer-events: none;
}
.leaflet-arrow-icon {
pointer-events: none !important;
}
.leaflet-km-marker,
.leaflet-km-marker-2 {
position: absolute;
z-index: 0 !important;
.leaflet-km-dist {
background: @red_secondary;
color: white;
border-radius: 4px;
font-size: 12px;
text-align: center;
min-width: 20px;
height: 14px;
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
top: 50%;
left: 50%;
font-weight: bold;
padding: 0 2px;
svg {
position: absolute;
top: -16px;
left: 50%;
transform: translate(-50%, 0);
}
&.reverse {
svg {
transform: translate(-50%, 0) rotate(180deg);
}
}
}
}
.end-marker {
.leaflet-km-dist {
left: auto;
right: -3px;
top: -3px;
position: absolute;
z-index: -10;
padding: 2px 16px 2px 4px;
&::after {
content: ' ';
width: 8px;
height: 8px;
border-radius: 4px;
background: white;
position: absolute;
right: 5px;
top: 5px;
}
}
&.right {
.leaflet-km-dist {
padding: 2px 4px 2px 16px;
left: -3px;
right: auto;
&::after {
left: 5px;
right: auto;
}
}
}
}
.router-marker {
div {
color: @router_line;
left: auto;
right: 50%;
transform: translate(50%, 0);
top: -20px;
position: absolute;
z-index: -10;
padding: 2px 2px 2px 4px;
border-radius: 100%;
font-weight: bold;
}
&.right {
div {
padding: 2px 4px 2px 16px;
left: -3px;
right: auto;
&::after {
left: 5px;
right: auto;
}
}
}
}
.leaflet-km-marker-2 {
.leaflet-km-dist {
background: green;
}
}
.touch-hinter-poly {
stroke: rgba(255, 50, 0, 0.1);
cursor: grab;
@media (max-width: @mobile_breakpoint) {
stroke: rgba(255, 50, 0, 0.2);
}
}
.leaflet-control-container .leaflet-routing-container-hide {
display: none;
}
.leaflet-bar {
box-shadow: @bar_shadow !important;
border: none !important;
}
.leaflet-bar a {
background: @bar_background;
color: white;
text-shadow: none;
user-select: none;
border-bottom: none;
&:hover {
background: @bar_background;
color: white;
border-bottom: none;
}
}
.location-marker {
width: 20px;
height: 3px;
margin-left: -10px;
margin-top: -2px;
outline: none;
z-index: 10001;
background: @red_secondary;
&:after {
content: ' ';
box-shadow: 0 0 0 3px @red_secondary;
background: white;
border-radius: 8px;
width: 8px;
height: 8px;
position: absolute;
left: 6px;
top: -3px;
}
&:before {
content: ' ';
display: block;
width: 3px;
height: 20px;
background: @red_secondary;
left: 8.5px;
top: -9px;
position: absolute;
}
}
.leaflet-top {
top: 42px;
}
.leaflet-div-icon {
background: none;
border: none;
}
.custom-marker-cluster {
width: 24px;
height: 24px;
background: @cluster_small;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
color: white;
box-shadow: fade(@cluster_small, 70%) 0 0 0 5px;
font-weight: bold;
font-size: 13px;
transform: translate(-12px, -12px);
transition: box-shadow 250ms;
position: relative;
outline: none;
&:hover {
box-shadow: fade(@cluster_small, 70%) 0 0 0 7px;
}
span {
outline: none;
position: absolute;
right: -7px;
bottom: 11px;
background: @cluster_small;
width: 16px;
height: 16px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
font-size: 11px;
}
}
#canvas {
background: #eeeeee;
z-index: 0;
> div {
width: 100%;
height: 100%;
}
}
.leaflet-pane {
user-select: none;
}