replace arrow functions on frontend with old style function

This commit is contained in:
Bilal Catic
2019-11-08 13:52:55 +01:00
parent 43747eb942
commit c2ffc906ea
4 changed files with 19 additions and 19 deletions

View File

@@ -42,7 +42,7 @@
function locateMe() {
if (navigator.geolocation) {
const onLocationSuccess = (position) => {
function onLocationSuccess (position) {
const coordinates = position && position.coords ? position.coords : null;
if (coordinates){
const longitude = coordinates.longitude || null;
@@ -53,7 +53,7 @@
map.setZoom(16);
}
}
};
}
navigator.geolocation.getCurrentPosition(onLocationSuccess);
}
@@ -162,8 +162,8 @@
input.attachEvent = addEventListenerWrapper
}
$(document).ready(() => {
$("#submit").click(() => {
$(document).ready(function() {
$("#submit").click(function() {
const mapBounds = map.getBounds();
$("#north").val(mapBounds.getNorthEast().lat());
@@ -178,4 +178,4 @@
});
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAna8ohfV2HBMcxGk_29vqxU5Z_bDickqg&language=bs&libraries=places&callback=initMap" async
defer></script>
defer></script>