Skip to content

Commit c647f82

Browse files
fix: incorrect zoom styling on maps
Some changes for zoom control css
2 parents 41119d1 + 5fb43c4 commit c647f82

File tree

2 files changed

+32
-29
lines changed

2 files changed

+32
-29
lines changed

libs/safe/src/lib/components/ui/map/map-zoom/map-zoom.component.html

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<!-- Component wrapper -->
22
<div class="relative flex flex-col items-center">
33
<button
4-
class="w-6 h-6 top-1 relative flex items-center justify-center bg-white rounded-md border-2 border-solid border-black border-opacity-20"
4+
class="w-6 h-6 relative flex items-center justify-center bg-white rounded-md border-2 border-solid border-black border-opacity-20"
55
(click)="zoomIn()"
66
>
77
<span class="font-bold">+</span>
88
</button>
99
<!-- Actual input range -->
10-
<input
11-
name="slider"
12-
style="--value:{{ currentZoom }}; --min:{{ minZoom }}; --max:{{
13-
maxZoom
14-
}}"
15-
class="h-full w-1"
16-
type="range"
17-
min="{{ minZoom }}"
18-
max="{{ maxZoom }}"
19-
value="{{ currentZoom }}"
20-
step="1"
21-
orient="vertical"
22-
(input)="onChangeFunction($event.target)"
23-
/>
10+
<div class="h-24 w-6 flex items-center justify-center">
11+
<input
12+
name="slider"
13+
style="--value:{{ currentZoom }}; --min:{{ minZoom }}; --max:{{
14+
maxZoom
15+
}}"
16+
type="range"
17+
min="{{ minZoom }}"
18+
max="{{ maxZoom }}"
19+
value="{{ currentZoom }}"
20+
step="1"
21+
(input)="onChangeFunction($event.target)"
22+
/>
23+
</div>
2424
<button
25-
class="w-6 h-6 bottom-1 relative flex items-center justify-center bg-white rounded-md border-2 border-solid border-black border-opacity-20"
25+
class="w-6 h-6 relative flex items-center justify-center bg-white rounded-md border-2 border-solid border-black border-opacity-20"
2626
(click)="zoomOut()"
2727
>
2828
<span class="font-bold">-</span>
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
1+
input[type='range'] {
2+
-webkit-appearance: none;
3+
width: 96px !important;
4+
min-width: 96px !important;
5+
max-width: 96px !important;
6+
height: 4px;
7+
transform: rotate(270deg);
8+
transform-origin: center;
19

2-
3-
input[type=range][orient=vertical]
4-
{
5-
writing-mode: bt-lr !important; /* IE */
6-
-webkit-appearance: slider-vertical !important; /* Chromium */
710
}
811

912
/** Chrome*/
1013
@media screen and (-webkit-min-device-pixel-ratio:0) {
1114
input[type='range'] {
1215
overflow: hidden;
13-
accent-color: theme('colors.primary.500');
16+
// accent-color: theme('colors.primary.500');
1417
}
1518

1619
input[type=range]::-webkit-slider-runnable-track {
20+
-webkit-appearance: none;
1721
background-color: #CCCCCC;
18-
border: 0.2px solid #CCCCCC;
1922
}
2023

2124
input[type='range']::-webkit-slider-thumb {
22-
background: theme('colors.primary.500');
23-
box-shadow: -10px 80px 0 80px theme('colors.primary.500');
25+
-webkit-appearance: none;
26+
width: 0px;
27+
height: 4px;
28+
box-shadow: -80px 0 0 80px theme('colors.primary.500');
2429
}
2530
}
2631

@@ -34,8 +39,7 @@ input[type="range"]::-moz-range-track {
3439
border: 0.2px solid #CCCCCC;
3540
}
3641
input[type=range]::-moz-range-thumb {
37-
background: theme('colors.primary.500');
38-
border: 0.2px solid theme('colors.primary.500');
42+
opacity: 0;
3943
}
4044

4145
/* Internet explorer*/
@@ -48,6 +52,5 @@ input[type="range"]::-ms-fill-upper {
4852
border: 0.2px solid #CCCCCC;
4953
}
5054
input[type=range]::-ms-thumb {
51-
background: theme('colors.primary.500');
52-
border: 0.2px solid theme('colors.primary.500');
55+
opacity: 0;
5356
}

0 commit comments

Comments
 (0)