summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/leaflet.markercluster.js/MarkerOpacity.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:45:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:45:13 +0000
commit3c99fde45db83b531c41c350ed4d0ac2a3c40c62 (patch)
treead5257daf9e41556ed73875ab56b69162dffdac1 /debian/missing-sources/leaflet.markercluster.js/MarkerOpacity.js
parentAdding upstream version 1.1.0. (diff)
downloadicingaweb2-module-map-3c99fde45db83b531c41c350ed4d0ac2a3c40c62.tar.xz
icingaweb2-module-map-3c99fde45db83b531c41c350ed4d0ac2a3c40c62.zip
Adding debian version 1.1.0-3.debian/1.1.0-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/missing-sources/leaflet.markercluster.js/MarkerOpacity.js')
-rw-r--r--debian/missing-sources/leaflet.markercluster.js/MarkerOpacity.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/missing-sources/leaflet.markercluster.js/MarkerOpacity.js b/debian/missing-sources/leaflet.markercluster.js/MarkerOpacity.js
new file mode 100644
index 0000000..e8b0bb6
--- /dev/null
+++ b/debian/missing-sources/leaflet.markercluster.js/MarkerOpacity.js
@@ -0,0 +1,22 @@
+/*
+* Extends L.Marker to include two extra methods: clusterHide and clusterShow.
+*
+* They work as setOpacity(0) and setOpacity(1) respectively, but
+* don't overwrite the options.opacity
+*
+*/
+
+L.Marker.include({
+ clusterHide: function () {
+ var backup = this.options.opacity;
+ this.setOpacity(0);
+ this.options.opacity = backup;
+ return this;
+ },
+
+ clusterShow: function () {
+ return this.setOpacity(this.options.opacity);
+ }
+});
+
+