Revize 90d3db28
Přidáno uživatelem Tomáš Ballák před asi 4 roky(ů)
website/public/js/zcu-heatmap.js | ||
---|---|---|
33 | 33 |
const genPopUp = (place, number, sum, currentPos, maxPos) => { |
34 | 34 |
const header = `<strong>Zařízení a počet:</strong><div id="place-info">${place}</div>` |
35 | 35 |
const currentNum = `<span id="digit-info">${number}</span>` |
36 |
const sumNum = `<span id="total-info" style="font-size: large">${sum ? '/' + sum : ''}</span>` |
|
36 |
// eslint-disable-next-line eqeqeq |
|
37 |
const sumNum = `<span id="total-info" style="font-size: large">${(sum && (sum != number)) ? '/' + sum : ''}</span>` |
|
37 | 38 |
const digitInfo = `<div id="number-info">${currentNum}${sumNum}</div>` |
38 | 39 |
let previousButton = '<button id="previous-info-btn" class="circle-button" onclick="previousInfo()"></button>' |
39 | 40 |
let nextButton = '<button id="next-info-btn" onclick="nextInfo()" class="circle-button next"></button>' |
... | ... | |
52 | 53 |
} |
53 | 54 |
// eslint-disable-next-line no-unused-vars |
54 | 55 |
function initMap () { |
55 |
|
|
56 |
startX = localStorage.getItem('lat') || startX; |
|
57 |
startY = localStorage.getItem('lng') || startY; |
|
58 |
startZoom = localStorage.getItem('zoom') || startZoom; |
|
56 |
startX = localStorage.getItem('lat') || startX |
|
57 |
startY = localStorage.getItem('lng') || startY |
|
58 |
startZoom = localStorage.getItem('zoom') || startZoom |
|
59 | 59 |
|
60 | 60 |
mymap = L.map('heatmap').setView([startX, startY], startZoom) |
61 | 61 |
|
... | ... | |
131 | 131 |
|
132 | 132 |
// eslint-disable-next-line no-unused-vars |
133 | 133 |
function setMapView (latitude, longitude, zoom) { |
134 |
localStorage.setItem('lat', latitude);
|
|
135 |
localStorage.setItem('lng', longitude);
|
|
136 |
localStorage.setItem('zoom', zoom);
|
|
134 |
localStorage.setItem('lat', latitude) |
|
135 |
localStorage.setItem('lng', longitude) |
|
136 |
localStorage.setItem('zoom', zoom) |
|
137 | 137 |
mymap.setView([latitude, longitude], zoom) |
138 | 138 |
} |
139 | 139 |
|
Také k dispozici: Unified diff
fix of popup,js path, button alignment