markerclustererplus-rails 2.0.11 → 2.0.12

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.
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.0.11"
3
+ VERSION = "2.0.12"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  /**
5
5
  * @name MarkerClustererPlus for Google Maps V3
6
- * @version 2.0.11 [April 19, 2012]
6
+ * @version 2.0.12 [April 21, 2012]
7
7
  * @author Gary Little
8
8
  * @fileoverview
9
9
  * The library creates and manages per-zoom-level clusters for large amounts of markers.
@@ -147,6 +147,7 @@ ClusterIcon.prototype.onAdd = function () {
147
147
  google.maps.event.addDomListener(this.div_, "click", function (e) {
148
148
  cMouseDownInCluster = false;
149
149
  if (!cDraggingMapByCluster) {
150
+ var theBounds;
150
151
  var mz;
151
152
  var mc = cClusterIcon.cluster_.getMarkerClusterer();
152
153
  /**
@@ -163,11 +164,16 @@ ClusterIcon.prototype.onAdd = function () {
163
164
  if (mc.getZoomOnClick()) {
164
165
  // Zoom into the cluster.
165
166
  mz = mc.getMaxZoom();
166
- mc.getMap().fitBounds(cClusterIcon.cluster_.getBounds());
167
- // Don't zoom beyond the max zoom level
168
- if (mz !== null && (mc.getMap().getZoom() > mz)) {
169
- mc.getMap().setZoom(mz + 1);
170
- }
167
+ theBounds = cClusterIcon.cluster_.getBounds();
168
+ mc.getMap().fitBounds(theBounds);
169
+ // There is a fix for Issue 170 here:
170
+ setTimeout(function () {
171
+ mc.getMap().fitBounds(theBounds);
172
+ // Don't zoom beyond the max zoom level
173
+ if (mz !== null && (mc.getMap().getZoom() > mz)) {
174
+ mc.getMap().setZoom(mz + 1);
175
+ }
176
+ }, 100);
171
177
  }
172
178
 
173
179
  // Prevent event propagation to the map:
@@ -1141,7 +1147,7 @@ MarkerClusterer.prototype.getClusterClass = function () {
1141
1147
  /**
1142
1148
  * Sets the value of the <code>clusterClass</code> property.
1143
1149
  *
1144
- * @param {number} clusterClass The value of the clusterClass property.
1150
+ * @param {string} clusterClass The value of the clusterClass property.
1145
1151
  */
1146
1152
  MarkerClusterer.prototype.setClusterClass = function (clusterClass) {
1147
1153
  this.clusterClass_ = clusterClass;
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markerclustererplus-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 11
10
- version: 2.0.11
9
+ - 12
10
+ version: 2.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - RogerE
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-22 00:00:00 Z
18
+ date: 2012-04-23 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: This gem provides the MarkerClustererPlus assets for your Rails application.