Skip to content

Commit 8475252

Browse files
committed
Add home button to new ui
1 parent 3dc99a1 commit 8475252

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

html/ui2.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ function buildBar() {
225225
+ ' <button id="ui2_menu_tools_btn" type="button" data-menu="tools"><span class="ui2-icon">' + I.route + '</span><span class="ui2-menubtn-label">Tools</span><span class="ui2-icon">' + I.caret + '</span></button>'
226226
+ ' </nav>'
227227
+ ' <div id="ui2_actions">'
228+
+ ' <button id="ui2_home" type="button" aria-label="Reset map view" title="Home / Reset map view (H)"><span class="ui2-icon">' + I.home + '</span></button>'
228229
+ ' <button id="ui2_bookmarks_btn" type="button" data-menu="bookmarks" aria-label="Bookmarks" title="Bookmarks"><span class="ui2-icon">' + I.star + '</span></button>'
229230
+ ' <button id="ui2_replay" type="button" aria-label="Replay history" title="Replay history (Y)"><span class="ui2-icon">' + I.history + '</span></button>'
230231
+ ' <button id="ui2_layers" type="button" aria-label="Map layers" title="Map layers"><span class="ui2-icon">' + I.layers + '</span></button>'
@@ -240,6 +241,7 @@ function buildBar() {
240241

241242
jQuery('#ui2_hamburger').on('click', function() { this.blur(); openSheet(); });
242243

244+
jQuery('#ui2_home').on('click', function() { this.blur(); resetMap(); });
243245
jQuery('#ui2_replay').on('click', function() { this.blur(); toggleReplay(); });
244246
jQuery('#ui2_layers').on('click', function() { this.blur(); openLayerSwitcher(); });
245247
jQuery('#ui2_settings_btn').on('click', function() { this.blur(); openModal(); });

0 commit comments

Comments
 (0)