diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..080bd20
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,13 @@
+# https://editorconfig.org
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+[*.html]
+indent_size = 2
diff --git a/src/css/map.css b/src/css/map.css
index 426073a..141bc0e 100644
--- a/src/css/map.css
+++ b/src/css/map.css
@@ -1,28 +1,28 @@
html, body {
- margin: 0px;
- padding: 0px;
- width: 100%;
- height: 100%;
+ margin: 0px;
+ padding: 0px;
+ width: 100%;
+ height: 100%;
}
#map {
- width: 100%;
- height: 100%;
+ width: 100%;
+ height: 100%;
}
.leaflet-popup-content-wrapper,
.leaflet-control-zoom {
- border-radius: 0px;
+ border-radius: 0px;
}
.leaflet-popup-content-wrapper {
- width: 600px;
- max-height: 400px;
- overflow-y:auto
+ width: 600px;
+ max-height: 400px;
+ overflow-y: auto;
}
.leaflet-popup-content {
- width:auto !important;
+ width: auto !important;
}
a img {
@@ -48,8 +48,8 @@ table {
}
.mobile tr td:first-child {
- padding: 0;
- padding-right: 10px;
+ padding: 0;
+ padding-right: 10px;
}
.mobile tr:nth-child(2n) {
@@ -69,21 +69,21 @@ table {
}
.legend {
- height: 52px;
- width: 130px;
- background-color: #fff;
- box-shadow: 0 1px 5px rgba(0,0,0,0.65);
+ height: 52px;
+ width: 130px;
+ background-color: #fff;
+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}
.holiday-legend {
- height: 72px;
- width: 145px;
- background-color: #fff;
- box-shadow: 0 1px 5px rgba(0,0,0,0.65);
+ height: 72px;
+ width: 145px;
+ background-color: #fff;
+ box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}
.legend .holiday {
- display: none;
+ display: none;
}
.type {
diff --git a/src/index.html b/src/index.html
index a7295fc..28cf8ba 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1,11 +1,11 @@
-
+
Bloklocaties in Vlaanderen
-
+
@@ -30,65 +30,60 @@
+
@@ -129,14 +124,13 @@
}(document, 'script', 'facebook-jssdk'));
diff --git a/src/js/map.js b/src/js/map.js
index 3a52979..c6ce5ed 100644
--- a/src/js/map.js
+++ b/src/js/map.js
@@ -72,90 +72,90 @@ $(document).ready(function() {
// code copied from http://jsfiddle.net/sowelie/3JbNY/
var HoverMarker = L.Marker.extend({
bindPopup: function(htmlContent, options) {
-
+
if (options && options.showOnMouseOver) {
-
+
// call the super method
L.Marker.prototype.bindPopup.apply(this, [htmlContent, options]);
-
+
// unbind the click event
this.off("click", this.openPopup, this);
-
+
// bind to mouse over
this.on("mouseover", function(e) {
-
+
// get the element that the mouse hovered onto
var target = e.originalEvent.fromElement || e.originalEvent.relatedTarget;
var parent = this._getParent(target, "leaflet-popup");
-
+
// check to see if the element is a popup, and if it is this marker's popup
if (parent == this._popup._container)
return true;
-
+
// show the popup
this.openPopup();
-
+
}, this);
-
+
// and mouse out
this.on("mouseout", function(e) {
-
+
// get the element that the mouse hovered onto
var target = e.originalEvent.toElement || e.originalEvent.relatedTarget;
-
+
// check to see if the element is a popup
if (this._getParent(target, "leaflet-popup")) {
-
+
L.DomEvent.on(this._popup._container, "mouseout", this._popupMouseOut, this);
return true;
-
+
}
-
+
// hide the popup
this.closePopup();
-
+
}, this);
-
+
}
-
+
},
-
+
_popupMouseOut: function(e) {
-
+
// detach the event
L.DomEvent.off(this._popup, "mouseout", this._popupMouseOut, this);
-
+
// get the element that the mouse hovered onto
var target = e.toElement || e.relatedTarget;
-
+
// check to see if the element is a popup
if (this._getParent(target, "leaflet-popup"))
return true;
-
+
// check to see if the marker was hovered back onto
if (target == this._icon)
return true;
-
+
// hide the popup
this.closePopup();
-
+
},
-
+
_getParent: function(element, className) {
-
+
var parent = element.parentNode;
-
+
while (parent != null) {
-
+
if (parent.className && L.DomUtil.hasClass(parent, className))
return parent;
-
+
parent = parent.parentNode;
-
+
}
-
+
return false;
-
+
}
});