From 19a3387f2cae0411e591070ba728eedacea2335b Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Fri, 05 Jul 2019 22:27:13 +0000 Subject: [PATCH] Use CSS icon for geolocation button, wrap it in #menu --- map.js | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/map.js b/map.js index 1bbd8c2..07f2361 100644 --- a/map.js +++ b/map.js @@ -594,7 +594,7 @@ })}, 10); }; showOnMapElement.addEventListener('click', showOnMapFunction); - showOnMapElement.className = 'icon-zoom pad-left-icon'; + showOnMapElement.className = 'icon-pin addon-icon'; showOnMapElement.title = lang.show_on_map; if(additional) { @@ -839,9 +839,9 @@ geolocation_layer = new ol.layer.Vector({ source: geolocation_source, }); - geolocation_button = document.querySelector('#track button'); + geolocation_button = document.querySelector('#track'); if(!navigator.geolocation) { - geolocation_button.classList.add('hidden'); + geolocation_button.remove(); } geolocation = new ol.Geolocation({projection: 'EPSG:3857'}); @@ -866,7 +866,7 @@ geolocation.on('error', function(error) { fail(lang.error_location + ' ' + error.message); trackingStop(); - geolocation_button.classList.add('hidden'); + geolocation_button.remove(); }); geolocation_button.addEventListener('click', trackingToggle); @@ -904,7 +904,7 @@ element: fail_element, }), new ol.control.Control({ - element: document.getElementById('track'), + element: document.getElementById('menu'), }), ]), loadTilesWhileAnimating: false, -- Gitblit v1.9.1