|
@@ -11,6 +11,7 @@ html, body {
|
11
|
11
|
}
|
12
|
12
|
#loading {
|
13
|
13
|
cursor: progress !important;
|
|
14
|
+ z-index: 1002;
|
14
|
15
|
}
|
15
|
16
|
#loading p {
|
16
|
17
|
border-radius: 5px;
|
|
@@ -41,7 +42,6 @@ html, body {
|
41
|
42
|
display: none;
|
42
|
43
|
}
|
43
|
44
|
#infopanel {
|
44
|
|
- display: none;
|
45
|
45
|
background-color: rgba(255, 255, 255, 0.9);
|
46
|
46
|
padding: 10px;
|
47
|
47
|
z-index: 1001;
|
|
@@ -115,6 +115,22 @@ hr {
|
115
|
115
|
.leaflet-control-search {
|
116
|
116
|
box-shadow: none;
|
117
|
117
|
}
|
|
118
|
+.shortcut {
|
|
119
|
+ text-decoration: underline 1px dotted;
|
|
120
|
+}
|
|
121
|
+#shortcutlist {
|
|
122
|
+ columns: 20em 2;
|
|
123
|
+}
|
|
124
|
+kbd {
|
|
125
|
+ color: #444;
|
|
126
|
+ background-color: #eee;
|
|
127
|
+ border-radius: 4px;
|
|
128
|
+ padding: 0px 2px;
|
|
129
|
+ border-color: #444;
|
|
130
|
+ border-width: 1px;
|
|
131
|
+ -webkit-box-shadow: 1px 1px #444;
|
|
132
|
+ box-shadow: 1px 1px #444;
|
|
133
|
+}
|
118
|
134
|
"
|
119
|
135
|
|
120
|
136
|
attribhtml <- '
|
|
@@ -130,7 +146,7 @@ title="A method of preserving confidentiality and anonymity">
|
130
|
146
|
random rounding</a>
|
131
|
147
|
'
|
132
|
148
|
|
133
|
|
-infotext <- div(class="overflowable",
|
|
149
|
+infotext <- div(class="overflowable", id="infoint", tabindex="2",
|
134
|
150
|
h3("How did Kiwis commute in 2018?"),
|
135
|
151
|
p("This tool maps the 2018 census",
|
136
|
152
|
a(href=
|
|
@@ -159,6 +175,17 @@ again-data-visualisation-competition", "data visualisation competition",
|
159
|
175
|
"(including the people who commute within the area). When no area is ",
|
160
|
176
|
"selected, colouring is according to commutes to or from all ",
|
161
|
177
|
"localities. Hover over areas for a summary (on a tablet, hold press)."),
|
|
178
|
+ h4("Keyboard shortcuts"),
|
|
179
|
+ shiny::tags$ul(id="shortcutlist",
|
|
180
|
+ shiny::tags$li(shiny::tags$kbd("I"), ": toggle this info page"),
|
|
181
|
+ shiny::tags$li(shiny::tags$kbd("M"), ": focus map"),
|
|
182
|
+ shiny::tags$li(shiny::tags$kbd("P"), ": show employment"),
|
|
183
|
+ shiny::tags$li(shiny::tags$kbd("D"), ": show education"),
|
|
184
|
+ shiny::tags$li(shiny::tags$kbd("F"), ": show people commuting from localities"),
|
|
185
|
+ shiny::tags$li(shiny::tags$kbd("T"), ": show people commuting to localities"),
|
|
186
|
+ shiny::tags$li(shiny::tags$kbd("O"), ": colour by most common commute type"),
|
|
187
|
+ shiny::tags$li(shiny::tags$kbd("U"), ": colour by number of commuters")
|
|
188
|
+ ),
|
162
|
189
|
h4("FAQ"),
|
163
|
190
|
shiny::tags$blockquote("Why are so many areas marked as 'works at ",
|
164
|
191
|
"home'?"),
|
|
@@ -191,31 +218,47 @@ again-data-visualisation-competition", "data visualisation competition",
|
191
|
218
|
keyboardjs <- tags$head(tags$script(HTML("
|
192
|
219
|
$(function(){
|
193
|
220
|
$(document).keyup(function(e) {
|
|
221
|
+ var active = document.activeElement
|
|
222
|
+ if (active.id == 'searchtext9') return;
|
194
|
223
|
switch(e.key) {
|
195
|
|
- case 'm':
|
|
224
|
+ case 'p':
|
|
225
|
+ case 'P':
|
196
|
226
|
document.getElementsByName('radioeduemp')[0].checked = true;
|
197
|
227
|
Shiny.onInputChange('radioeduemp', 'Employment')
|
198
|
228
|
break;
|
199
|
229
|
case 'd':
|
|
230
|
+ case 'D':
|
200
|
231
|
document.getElementsByName('radioeduemp')[1].checked = true;
|
201
|
232
|
Shiny.onInputChange('radioeduemp', 'Education')
|
202
|
233
|
break;
|
203
|
234
|
case 'f':
|
|
235
|
+ case 'F':
|
204
|
236
|
document.getElementsByName('radioinout')[0].checked = true;
|
205
|
237
|
Shiny.onInputChange('radioinout', 'res')
|
206
|
238
|
break;
|
207
|
239
|
case 't':
|
|
240
|
+ case 'T':
|
208
|
241
|
document.getElementsByName('radioinout')[1].checked = true;
|
209
|
242
|
Shiny.onInputChange('radioinout', 'work')
|
210
|
243
|
break;
|
211
|
244
|
case 'o':
|
|
245
|
+ case 'O':
|
212
|
246
|
document.getElementsByName('radiocolour')[0].checked = true;
|
213
|
247
|
Shiny.onInputChange('radiocolour', 'type')
|
214
|
248
|
break;
|
215
|
249
|
case 'u':
|
|
250
|
+ case 'U':
|
216
|
251
|
document.getElementsByName('radiocolour')[1].checked = true;
|
217
|
252
|
Shiny.onInputChange('radiocolour', 'number')
|
218
|
253
|
break;
|
|
254
|
+ case 'i':
|
|
255
|
+ case 'I':
|
|
256
|
+ shinyjs.click('mapinfobutton')
|
|
257
|
+ break;
|
|
258
|
+ case 'm':
|
|
259
|
+ case 'M':
|
|
260
|
+ document.getElementById('map').focus()
|
|
261
|
+ break;
|
219
|
262
|
default:
|
220
|
263
|
break;
|
221
|
264
|
}
|