diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-03-04 16:18:54 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-03-04 16:18:54 +0100 |
| commit | dc6a8b4ad5e29f8aea2de73646aeca6e819db0b0 (patch) | |
| tree | 542bdc5031bd5be486a9b7d657a5c35cce1bffa3 /client | |
| parent | bc0349c19a63b06859341bfa83ff43efdea763d4 (diff) | |
rebuild
Diffstat (limited to 'client')
| -rw-r--r-- | client/map/index.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/client/map/index.js b/client/map/index.js index 56a5abed..4b922ec5 100644 --- a/client/map/index.js +++ b/client/map/index.js @@ -76,17 +76,19 @@ export default function append(el, payload) { if (address) { source = [address.lat, address.lng].map(n => parseFloat(n)) + } else { + console.error("No address found for root paper") + console.log(data) } - // ....i dont think the sort order does anything?? - citations.sort((a, b) => sortOrder.indexOf(a) - sortOrder.indexOf(b)) - .forEach(citation => { - const citationAddress = citation.addresses[0] - const latlng = [citationAddress.lat, citationAddress.lng].map(n => parseFloat(n)) - if (Number.isNaN(latlng[0]) || Number.isNaN(latlng[1])) return - addMarker(map, latlng, citation.title, citationAddress.name) - addArc(map, source, latlng, arcStyles[citationAddress.type]) - }) + citations.forEach(citation => { + // console.log(citation) + const citationAddress = citation.addresses[0] + const latlng = [citationAddress.lat, citationAddress.lng].map(n => parseFloat(n)) + if (Number.isNaN(latlng[0]) || Number.isNaN(latlng[1])) return + addMarker(map, latlng, citation.title, citationAddress.name) + addArc(map, source, latlng, arcStyles[citationAddress.type]) + }) console.log(paper) |
