Explorar el Código

Shortcut for reset map button

Petra Lamborn hace 3 años
padre
commit
a3651c3a55
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5
    0
      viz/extras.R

+ 5
- 0
viz/extras.R Ver fichero

@@ -240,6 +240,7 @@ again-data-visualisation-competition", title="June-July 2020",
240 240
                      shiny::tags$kbd(HTML("↓")),
241 241
                      ": move map")
242 242
     ),
243
+    shiny::tags$li(shiny::tags$kbd("R"), ": reset map position"),
243 244
     shiny::tags$li(shiny::tags$kbd("S"), ": search map"),
244 245
     shiny::tags$li(shiny::tags$kbd("L"), ": show/hide options panel"),
245 246
     shiny::tags$li(shiny::tags$kbd("P"), ": show employment data"),
@@ -339,6 +340,10 @@ $(function(){
339 340
       case 'L':
340 341
         document.getElementById('controlswitch').click();
341 342
         break;
343
+      case 'r':
344
+      case 'R':
345
+        document.getElementsByClassName('easy-button-button')[0].click()
346
+        break;
342 347
       default:
343 348
         break;
344 349
     }