mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Beautify javascript (fixes #980)
This commit is contained in:
parent
75a3c45628
commit
d814977536
5 changed files with 654 additions and 647 deletions
11
js/events.js
11
js/events.js
|
@ -10,13 +10,20 @@ layout: null
|
|||
var zoom = 2;
|
||||
var minzoom = 1;
|
||||
if (isMobile()) var zoom = minzoom = 0;
|
||||
var map = L.map('eventmap',{ 'zoom': zoom, 'minZoom': minzoom, 'center': [20.00, 10.00]});
|
||||
var map = L.map('eventmap', {
|
||||
'zoom': zoom,
|
||||
'minZoom': minzoom,
|
||||
'center': [20.00, 10.00]
|
||||
});
|
||||
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: 'Data © by <a href="http://www.openstreetmap.org/copyright">OpenStreetMap contributors</a>.',
|
||||
maxZoom: 18
|
||||
}).addTo(map);
|
||||
|
||||
var markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 40});
|
||||
var markers = new L.MarkerClusterGroup({
|
||||
showCoverageOnHover: false,
|
||||
maxClusterRadius: 40
|
||||
});
|
||||
for (var i = 0, nds = document.getElementById('eventdata').getElementsByTagName('DIV'), n = nds.length; i < n; i++) {
|
||||
L.marker([parseFloat(nds[i].getAttribute('data-lat')), parseFloat(nds[i].getAttribute('data-lon'))]).bindPopup(nds[i].innerHTML).addTo(markers);
|
||||
}
|
||||
|
|
10
js/ie.js
10
js/ie.js
|
@ -24,14 +24,14 @@ if ((version >= 5.5) && (document.body.filters))
|
|||
var imgWidth = img.width;
|
||||
var imgHeight = img.height;
|
||||
//Workaround for hidden img to prevent 0px width and height
|
||||
if(img.src.indexOf('/img/clients/')!==-1){imgWidth='72';imgHeight='72';}
|
||||
if (img.src.indexOf('/img/clients/') !== -1) {
|
||||
imgWidth = '72';
|
||||
imgHeight = '72';
|
||||
}
|
||||
if (img.align == "left") imgStyle = "float:left;" + imgStyle
|
||||
if (img.align == "right") imgStyle = "float:right;" + imgStyle
|
||||
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
|
||||
var strNewHTML = "<span " + imgID + imgClass + imgTitle
|
||||
+ " style=\"" + "width:" + imgWidth + "px; height:" + imgHeight + "px;" + imgStyle + ";"
|
||||
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
|
||||
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
|
||||
var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + imgWidth + "px; height:" + imgHeight + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
|
||||
img.outerHTML = strNewHTML
|
||||
i = i - 1
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue