mapbox-gl-rails 0.53.1 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mapbox-gl-geocoder.js +2 -3
- data/app/assets/javascripts/mapbox-gl.js +3508 -2580
- data/app/assets/stylesheets/mapbox-gl-geocoder.scss +152 -108
- data/app/assets/stylesheets/mapbox-gl.scss +11 -0
- data/lib/mapbox-gl/rails/version.rb +2 -2
- data/plugins.yaml +1 -1
- metadata +2 -2
@@ -1,47 +1,55 @@
|
|
1
1
|
/* Basics */
|
2
2
|
|
3
3
|
.mapboxgl-ctrl-geocoder {
|
4
|
-
-webkit-box-sizing: border-box;
|
5
|
-
-moz-box-sizing: border-box;
|
6
4
|
box-sizing: border-box;
|
7
5
|
|
8
6
|
* {
|
9
|
-
-webkit-box-sizing: border-box;
|
10
|
-
-moz-box-sizing: border-box;
|
11
7
|
box-sizing: border-box;
|
12
8
|
|
13
9
|
&:after, &:before {
|
14
|
-
-webkit-box-sizing: border-box;
|
15
|
-
-moz-box-sizing: border-box;
|
16
10
|
box-sizing: border-box;
|
17
11
|
}
|
18
12
|
}
|
19
13
|
|
20
|
-
font:
|
14
|
+
font-size: 18px;
|
15
|
+
line-height: 24px;
|
16
|
+
font-family: "Open Sans", "Helvetica Neue", Arial, Helvetica, sans-serif;
|
21
17
|
position: relative;
|
22
|
-
background-color:
|
23
|
-
width:
|
18
|
+
background-color: #fff;
|
19
|
+
width: 100%;
|
24
20
|
min-width: 240px;
|
25
|
-
max-width: 360px;
|
26
21
|
z-index: 1;
|
27
|
-
border-radius:
|
22
|
+
border-radius: 4px;
|
23
|
+
transition: width .25s, min-width .25s;
|
28
24
|
|
29
25
|
input {
|
30
|
-
&[type=
|
31
|
-
font
|
26
|
+
&[type="text"] {
|
27
|
+
font: inherit;
|
32
28
|
width: 100%;
|
33
29
|
border: 0;
|
34
30
|
background-color: transparent;
|
35
|
-
height: 40px;
|
36
31
|
margin: 0;
|
37
|
-
|
38
|
-
|
32
|
+
height: 50px;
|
33
|
+
color: #404040;
|
34
|
+
|
35
|
+
/* fallback */
|
36
|
+
color: rgba(0, 0, 0, 0.75);
|
37
|
+
padding: 6px 30px;
|
39
38
|
text-overflow: ellipsis;
|
40
39
|
white-space: nowrap;
|
41
40
|
overflow: hidden;
|
42
41
|
}
|
43
42
|
|
43
|
+
&::-ms-clear {
|
44
|
+
display: none;
|
45
|
+
|
46
|
+
/* hide input clear button in IE */
|
47
|
+
}
|
48
|
+
|
44
49
|
&:focus {
|
50
|
+
color: #404040;
|
51
|
+
|
52
|
+
/* fallback */
|
45
53
|
color: rgba(0, 0, 0, 0.75);
|
46
54
|
outline: 0;
|
47
55
|
box-shadow: none;
|
@@ -49,151 +57,187 @@
|
|
49
57
|
}
|
50
58
|
}
|
51
59
|
|
52
|
-
.geocoder-
|
53
|
-
position: absolute;
|
54
|
-
top: 10px;
|
55
|
-
left: 10px;
|
56
|
-
}
|
57
|
-
|
58
|
-
button {
|
59
|
-
padding: 0;
|
60
|
-
margin: 0;
|
61
|
-
background-color: #fff;
|
62
|
-
border: none;
|
63
|
-
cursor: pointer;
|
64
|
-
}
|
65
|
-
|
66
|
-
.geocoder-pin-right * {
|
67
|
-
background-color: #fff;
|
60
|
+
.geocoder-pin-right > * {
|
68
61
|
z-index: 2;
|
69
62
|
position: absolute;
|
70
|
-
right:
|
71
|
-
top:
|
63
|
+
right: 8px;
|
64
|
+
top: 7px;
|
72
65
|
display: none;
|
73
66
|
}
|
74
67
|
|
75
|
-
box-shadow: 0 0
|
68
|
+
box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
|
76
69
|
|
77
70
|
ul {
|
78
|
-
box-shadow: 0 0
|
79
|
-
background-color: #fff;
|
80
|
-
border-radius: 0 0 3px 3px;
|
81
|
-
left: 0;
|
82
|
-
list-style: none;
|
83
|
-
margin: 0;
|
84
|
-
padding: 0;
|
85
|
-
position: absolute;
|
86
|
-
width: 100%;
|
87
|
-
top: 100%;
|
88
|
-
z-index: 1000;
|
89
|
-
overflow: hidden;
|
90
|
-
font-size: 12px;
|
71
|
+
box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.1);
|
91
72
|
}
|
92
73
|
}
|
93
74
|
|
75
|
+
/* Collapsed */
|
76
|
+
|
77
|
+
.geocoder-collapsed {
|
78
|
+
width: 30px;
|
79
|
+
min-width: 30px;
|
80
|
+
transition: width .25s, min-width .25s;
|
81
|
+
}
|
82
|
+
|
94
83
|
/* Suggestions */
|
95
84
|
|
85
|
+
.mapboxgl-ctrl-geocoder ul {
|
86
|
+
background-color: #fff;
|
87
|
+
border-radius: 4px;
|
88
|
+
left: 0;
|
89
|
+
list-style: none;
|
90
|
+
margin: 0;
|
91
|
+
padding: 0;
|
92
|
+
position: absolute;
|
93
|
+
width: 100%;
|
94
|
+
top: 110%;
|
95
|
+
|
96
|
+
/* fallback */
|
97
|
+
top: calc(100% + 6px);
|
98
|
+
z-index: 1000;
|
99
|
+
overflow: hidden;
|
100
|
+
font-size: 15px;
|
101
|
+
}
|
102
|
+
|
96
103
|
.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-geocoder ul, .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl-geocoder ul {
|
97
104
|
top: auto;
|
98
105
|
bottom: 100%;
|
99
106
|
}
|
100
107
|
|
101
|
-
.mapboxgl-ctrl-geocoder ul >
|
102
|
-
> a {
|
103
|
-
clear: both;
|
108
|
+
.mapboxgl-ctrl-geocoder ul > {
|
109
|
+
li > a {
|
104
110
|
cursor: default;
|
105
111
|
display: block;
|
106
|
-
padding:
|
107
|
-
white-space: nowrap;
|
108
|
-
overflow: hidden;
|
109
|
-
text-overflow: ellipsis;
|
110
|
-
white-space: nowrap;
|
111
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
112
|
+
padding: 6px 12px;
|
112
113
|
color: #404040;
|
113
114
|
}
|
114
115
|
|
115
|
-
|
116
|
-
|
117
|
-
}
|
118
|
-
|
119
|
-
> a:hover {
|
120
|
-
color: #202020;
|
116
|
+
.active > a, li > a:hover {
|
117
|
+
color: #404040;
|
121
118
|
background-color: #f3f3f3;
|
122
119
|
text-decoration: none;
|
123
120
|
cursor: pointer;
|
124
121
|
}
|
122
|
+
}
|
125
123
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
}
|
124
|
+
.geocoder-suggestion-title {
|
125
|
+
font-weight: bold;
|
126
|
+
text-overflow: ellipsis;
|
127
|
+
overflow: hidden;
|
128
|
+
white-space: nowrap;
|
132
129
|
}
|
133
130
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
131
|
+
.geocoder-suggestion-address {
|
132
|
+
text-overflow: ellipsis;
|
133
|
+
overflow: hidden;
|
134
|
+
white-space: nowrap;
|
135
|
+
}
|
138
136
|
|
139
|
-
|
140
|
-
|
141
|
-
|
137
|
+
/* Icons */
|
138
|
+
|
139
|
+
.geocoder-icon {
|
140
|
+
display: inline-block;
|
141
|
+
vertical-align: middle;
|
142
|
+
speak: none;
|
143
|
+
fill: #757575;
|
144
|
+
top: 15px;
|
142
145
|
}
|
143
146
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
147
|
+
.geocoder-icon-search {
|
148
|
+
position: absolute;
|
149
|
+
top: 15px;
|
150
|
+
left: 5px;
|
151
|
+
width: 20px;
|
152
|
+
height: 20px;
|
153
|
+
}
|
148
154
|
|
149
|
-
|
150
|
-
|
151
|
-
|
155
|
+
.mapboxgl-ctrl-geocoder button {
|
156
|
+
padding: 0;
|
157
|
+
margin: 0;
|
158
|
+
border: none;
|
159
|
+
cursor: pointer;
|
160
|
+
background: #fff;
|
161
|
+
}
|
162
|
+
|
163
|
+
.geocoder-icon-close {
|
164
|
+
width: 20px;
|
165
|
+
height: 20px;
|
166
|
+
margin-top: 8px;
|
167
|
+
margin-right: 3px;
|
168
|
+
}
|
169
|
+
|
170
|
+
.mapboxgl-ctrl-geocoder button:hover .geocoder-icon-close {
|
171
|
+
fill: #909090;
|
172
|
+
}
|
173
|
+
|
174
|
+
.geocoder-icon-loading {
|
175
|
+
width: 26px;
|
176
|
+
height: 26px;
|
177
|
+
margin-top: 5px;
|
178
|
+
margin-right: 0px;
|
179
|
+
-moz-animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
|
180
|
+
-webkit-animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
|
181
|
+
animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
|
152
182
|
}
|
153
183
|
|
154
|
-
|
184
|
+
/* Animation */
|
185
|
+
@-webkit-keyframes rotate {
|
155
186
|
from {
|
156
|
-
-
|
187
|
+
-webkit-transform: rotate(0);
|
188
|
+
transform: rotate(0);
|
157
189
|
}
|
158
190
|
|
159
191
|
to {
|
160
|
-
-
|
192
|
+
-webkit-transform: rotate(360deg);
|
193
|
+
transform: rotate(360deg);
|
161
194
|
}
|
162
195
|
}
|
163
196
|
|
164
197
|
@keyframes rotate {
|
165
198
|
from {
|
166
|
-
transform: rotate(
|
199
|
+
-webkit-transform: rotate(0);
|
200
|
+
transform: rotate(0);
|
167
201
|
}
|
168
202
|
|
169
203
|
to {
|
204
|
+
-webkit-transform: rotate(360deg);
|
170
205
|
transform: rotate(360deg);
|
171
206
|
}
|
172
207
|
}
|
173
208
|
|
174
|
-
/*
|
209
|
+
/* Media queries*/
|
210
|
+
@media screen and (min-width: 640px) {
|
211
|
+
.mapboxgl-ctrl-geocoder {
|
212
|
+
width: 33.3333%;
|
213
|
+
font-size: 15px;
|
214
|
+
line-height: 20px;
|
215
|
+
max-width: 360px;
|
175
216
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
vertical-align: middle;
|
181
|
-
speak: none;
|
182
|
-
background-repeat: no-repeat;
|
183
|
-
}
|
217
|
+
ul {
|
218
|
+
font-size: 13px;
|
219
|
+
}
|
220
|
+
}
|
184
221
|
|
185
|
-
.geocoder-icon
|
186
|
-
|
187
|
-
}
|
222
|
+
.geocoder-icon {
|
223
|
+
top: 8px;
|
224
|
+
}
|
188
225
|
|
189
|
-
.geocoder-icon-close {
|
190
|
-
|
191
|
-
|
226
|
+
.geocoder-icon-close {
|
227
|
+
width: 16px;
|
228
|
+
height: 16px;
|
229
|
+
margin-top: 3px;
|
230
|
+
margin-right: 0;
|
231
|
+
}
|
192
232
|
|
193
|
-
.
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
-
|
198
|
-
|
233
|
+
.mapboxgl-ctrl-geocoder input[type="text"] {
|
234
|
+
height: 36px;
|
235
|
+
}
|
236
|
+
|
237
|
+
.geocoder-icon-loading {
|
238
|
+
width: 26px;
|
239
|
+
height: 26px;
|
240
|
+
margin-top: -2px;
|
241
|
+
margin-right: -5px;
|
242
|
+
}
|
199
243
|
}
|
@@ -85,6 +85,9 @@
|
|
85
85
|
.mapboxgl-ctrl {
|
86
86
|
clear: both;
|
87
87
|
pointer-events: auto;
|
88
|
+
|
89
|
+
/* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */
|
90
|
+
transform: translate(0, 0);
|
88
91
|
}
|
89
92
|
|
90
93
|
.mapboxgl-ctrl-top-left .mapboxgl-ctrl {
|
@@ -161,6 +164,11 @@
|
|
161
164
|
|
162
165
|
padding: 5px;
|
163
166
|
|
167
|
+
&.mapboxgl-ctrl-icon-disabled {
|
168
|
+
opacity: 0.25;
|
169
|
+
border-color: #373737;
|
170
|
+
}
|
171
|
+
|
164
172
|
&.mapboxgl-ctrl-zoom-out {
|
165
173
|
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath style='fill:%23333333;' d='m 7,9 c -0.554,0 -1,0.446 -1,1 0,0.554 0.446,1 1,1 l 6,0 c 0.554,0 1,-0.446 1,-1 0,-0.554 -0.446,-1 -1,-1 z'/%3E %3C/svg%3E");
|
166
174
|
}
|
@@ -293,6 +301,8 @@ a.mapboxgl-ctrl-logo {
|
|
293
301
|
|
294
302
|
@media screen {
|
295
303
|
.mapboxgl-ctrl-attrib.mapboxgl-compact {
|
304
|
+
min-height: 20px;
|
305
|
+
padding: 0;
|
296
306
|
margin: 10px;
|
297
307
|
position: relative;
|
298
308
|
background-color: #fff;
|
@@ -301,6 +311,7 @@ a.mapboxgl-ctrl-logo {
|
|
301
311
|
&:hover {
|
302
312
|
padding: 2px 24px 2px 4px;
|
303
313
|
visibility: visible;
|
314
|
+
margin-top: 6px;
|
304
315
|
}
|
305
316
|
}
|
306
317
|
|
data/plugins.yaml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mapbox-gl-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.54.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Bulai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|