markerclustererplus-rails 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5f00481294f90a206a80a5040904c7aac816d83918ca05b75f646c4dcad516f
|
4
|
+
data.tar.gz: 433bfe00a960b076ab7fd6ccad391f372ce573de50e252ebf06c163d0c09466a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6567fcd986e750f0366b1274275cdb23a65fd14efca975dc2e9e8500d4750f0d911d184b2925ab27a32ee31a03e9b7b23e5b085b03026597a8084120050618bd
|
7
|
+
data.tar.gz: 7f79209968fca8ad370324b2abf9167b5d1b3ad70b596d7800e20162da9f05b9c75da106015e92a2de06ed8e1d51782c51de02914d15e4ec6a800c40acf0b0b1
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* @name MarkerClustererPlus for Google Maps V3
|
3
|
-
* @version 2.1.
|
3
|
+
* @version 2.1.7 [March 3, 2018]
|
4
4
|
* @author Gary Little
|
5
5
|
* @fileoverview
|
6
6
|
* The library creates and manages per-zoom-level clusters for large amounts of markers.
|
@@ -23,7 +23,7 @@
|
|
23
23
|
* This file modified for use with the Rails asset pipeline
|
24
24
|
* https://github.com/RogerE/markerclustererplus-rails
|
25
25
|
* gem markerclustererplus-rails
|
26
|
-
* gem version 2.1.
|
26
|
+
* gem version 2.1.7
|
27
27
|
* @author Roger Ertesvag
|
28
28
|
* NOTE: to include the MarkerClustererPlus icons in the asset pipeline the gem overrides
|
29
29
|
* the original configuration for setting the icon properties. This means that changing
|
@@ -145,6 +145,11 @@ ClusterIcon.prototype.onAdd = function () {
|
|
145
145
|
cMouseDownInCluster = true;
|
146
146
|
cDraggingMapByCluster = false;
|
147
147
|
});
|
148
|
+
|
149
|
+
// March 1, 2018: Fix for this 3.32 exp bug, https://issuetracker.google.com/issues/73571522
|
150
|
+
google.maps.event.addDomListener(this.div_, "touchstart", function (e) {
|
151
|
+
e.stopPropagation();
|
152
|
+
});
|
148
153
|
|
149
154
|
google.maps.event.addDomListener(this.div_, "click", function (e) {
|
150
155
|
cMouseDownInCluster = false;
|
@@ -748,20 +753,25 @@ MarkerClusterer.prototype.onAdd = function () {
|
|
748
753
|
this.ready_ = true;
|
749
754
|
|
750
755
|
this.repaint();
|
756
|
+
|
757
|
+
this.prevZoom_ = this.getMap().getZoom();
|
751
758
|
|
752
759
|
// Add the map event listeners
|
753
760
|
this.listeners_ = [
|
754
761
|
google.maps.event.addListener(this.getMap(), "zoom_changed", function () {
|
755
|
-
|
756
|
-
//
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
762
|
+
// Fix for bug #407
|
763
|
+
// Determines map type and prevents illegal zoom levels
|
764
|
+
var zoom = this.getMap().getZoom();
|
765
|
+
var minZoom = this.getMap().minZoom || 0;
|
766
|
+
var maxZoom = Math.min(this.getMap().maxZoom || 100,
|
767
|
+
this.getMap().mapTypes[this.getMap().getMapTypeId()].maxZoom);
|
768
|
+
zoom = Math.min(Math.max(zoom,minZoom),maxZoom);
|
769
|
+
|
770
|
+
if (this.prevZoom_ != zoom) {
|
771
|
+
this.prevZoom_ = zoom;
|
772
|
+
this.resetViewport_(false);
|
763
773
|
}
|
764
|
-
}),
|
774
|
+
}.bind(this)),
|
765
775
|
google.maps.event.addListener(this.getMap(), "idle", function () {
|
766
776
|
cMarkerClusterer.redraw_();
|
767
777
|
})
|
@@ -846,7 +856,10 @@ MarkerClusterer.prototype.fitMapToMarkers = function () {
|
|
846
856
|
var markers = this.getMarkers();
|
847
857
|
var bounds = new google.maps.LatLngBounds();
|
848
858
|
for (i = 0; i < markers.length; i++) {
|
849
|
-
|
859
|
+
// March 3, 2018: Bug fix -- honor the ignoreHidden property
|
860
|
+
if (markers[i].getVisible() || !this.getIgnoreHidden()) {
|
861
|
+
bounds.extend(markers[i].getPosition());
|
862
|
+
}
|
850
863
|
}
|
851
864
|
|
852
865
|
this.getMap().fitBounds(bounds);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markerclustererplus-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RogerE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem provides the MarkerClustererPlus assets for your Rails application.
|
14
14
|
email:
|