1
0

Integrated reset_zoom as a map button.

This commit is contained in:
Markus Birth 2018-06-04 00:05:05 +02:00
parent e6ad834645
commit 79c2cec956
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A
3 changed files with 5 additions and 9 deletions

View File

@ -157,11 +157,6 @@ window.initUI = ->
# setup history popupstate event handler
window.onpopstate = window.handlePopState
window.resetZoom = ->
console.log 'resetZoom'
window.mymap.resetZoom()
return false
window.setLiveMap = ->
console.log 'setLiveMap'
if window.mymap.toggleLiveView()

View File

@ -59,6 +59,11 @@ class window.OwnMap
L.control.layers(layers, overlays).addTo @mymap
L.easyButton 'fa-map', (btn, map) =>
@resetZoom()
, 'Reset Zoom'
.addTo @mymap
btn_showhide = L.easyButton
states: [{
stateName: 'show-markers'

View File

@ -37,10 +37,6 @@
<span class="d-none d-sm-block">Config</span>
<span class="d-block d-sm-none"><span class="fas fa-cog"></span></span>
</a>
<a href="#" onclick="resetZoom();" class="btn btn-default">
<span class="d-none d-sm-block">Reset view</span>
<span class="d-block d-sm-none"><span class="fas fa-crosshairs"></span></span>
</a>
<a href="#" onclick="gotoDate();" class="btn btn-default" style="display: inline-block;" id="todayButton">
<span class="d-none d-sm-block">Today</span>
<span class="d-block d-sm-none"><span class="fas fa-arrow-up"></span></span>