Skip to content

Commit

Permalink
Update NPM dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
samwilson authored May 13, 2021
1 parent ddad624 commit 4af5c8c
Show file tree
Hide file tree
Showing 34 changed files with 4,702 additions and 12,151 deletions.
11 changes: 5 additions & 6 deletions assets/css/app.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
@import "../../node_modules/normalize.css/normalize.css";
@import "flash";
@import "post";
@import "security";
@import "contact";
@import "tags";

@font-color: #283434;
@font-color-light: #768282;
Expand Down Expand Up @@ -190,9 +195,3 @@ nav.pagination {
text-align: center;
margin: 1em 0;
}

@import "flash";
@import "post";
@import "security";
@import "contact";
@import "tags";
Binary file added assets/img/map-pin-2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/map-pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/img/map-pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions assets/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ import L, { LatLng } from 'leaflet';
import 'leaflet/dist/leaflet.css';
import '../css/map.less';

/* This code is needed to properly load the images in the Leaflet CSS */
delete L.Icon.Default.prototype._getIconUrl;
L.Icon.Default.mergeOptions({
iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png').default,
iconUrl: require('leaflet/dist/images/marker-icon.png').default,
shadowUrl: require('leaflet/dist/images/marker-shadow.png').default
});

const map = L.map('map', {
preferCanvas: true
});
Expand Down Expand Up @@ -72,15 +64,23 @@ map.on('click', clickEvent => {
});

function makeMarker (latLng) {
marker = new L.Marker(latLng, { draggable: true });
marker = new L.Marker(latLng, {
draggable: mapData.edit,
icon: L.icon({
iconUrl: '/build/images/map-pin.png',
iconRetinaUrl: '/build/images/map-pin-2x.png',
iconSize: [20, 24],
iconAnchor: [10, 24]
})
});
map.addLayer(marker);
marker.on('dragend', dragEvent => {
moveMarker(dragEvent.target.getLatLng());
});
}

function moveMarker (latLng) {
marker.setLatLng(latLng, { draggable: true });
marker.setLatLng(latLng);
map.panTo(latLng);
// Round the coordinates https://xkcd.com/2170/
document.getElementById('latitude').value = latLng.lat.toFixed(5);
Expand Down
4 changes: 2 additions & 2 deletions assets/js/tags.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var $ = require('jquery');
import $ from 'jquery';
require('select2/dist/js/select2.min');
require('select2/dist/css/select2.min.css');

var wikidataResultTemplate = function (result) {
const wikidataResultTemplate = function (result) {
console.log(result);
if (result.loading) {
return result.text;
Expand Down
Loading

0 comments on commit 4af5c8c

Please sign in to comment.