[Pkg-javascript-commits] [leaflet-markercluster] 405/479: Update build
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:01:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit c4f4d8172225566d8f5e54e1ad6c0096153b5519
Author: danzel <danzel at localhost.geek.nz>
Date: Fri Jul 5 11:28:41 2013 +1200
Update build
---
dist/leaflet.markercluster-src.js | 48 ++++++++++++++++++++++++++++-----------
dist/leaflet.markercluster.js | 2 +-
2 files changed, 36 insertions(+), 14 deletions(-)
diff --git a/dist/leaflet.markercluster-src.js b/dist/leaflet.markercluster-src.js
index ae932c9..0cc024a 100644
--- a/dist/leaflet.markercluster-src.js
+++ b/dist/leaflet.markercluster-src.js
@@ -375,6 +375,10 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._map = map;
var i, l, layer;
+ if (!isFinite(this._map.getMaxZoom())) {
+ throw "Map has no maxZoom specified";
+ }
+
this._featureGroup.onAdd(map);
this._nonPointGroup.onAdd(map);
@@ -1667,7 +1671,9 @@ L.MarkerCluster.include({
m.setLatLng(m._preSpiderfyLatlng);
delete m._preSpiderfyLatlng;
}
- m.setZIndexOffset(0);
+ if (m.setZIndexOffset) {
+ m.setZIndexOffset(0);
+ }
if (m._spiderLeg) {
map.removeLayer(m._spiderLeg);
@@ -1691,7 +1697,9 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
m._preSpiderfyLatlng = m._latlng;
m.setLatLng(newPos);
- m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING
+ if (m.setZIndexOffset) {
+ m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING
+ }
fg.addLayer(m);
@@ -1725,12 +1733,18 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
for (i = childMarkers.length - 1; i >= 0; i--) {
m = childMarkers[i];
- m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING
- m.setOpacity(0);
+ //If it is a marker, add it now and we'll animate it out
+ if (m.setOpacity) {
+ m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING
+ m.setOpacity(0);
+
+ fg.addLayer(m);
- fg.addLayer(m);
-
- m._setPos(thisLayerPos);
+ m._setPos(thisLayerPos);
+ } else {
+ //Vectors just get immediately added
+ fg.addLayer(m);
+ }
}
group._forceLayout();
@@ -1747,7 +1761,10 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
//Move marker to new position
m._preSpiderfyLatlng = m._latlng;
m.setLatLng(newPos);
- m.setOpacity(1);
+
+ if (m.setOpacity) {
+ m.setOpacity(1);
+ }
//Add Legs.
@@ -1835,9 +1852,12 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
m.setLatLng(m._preSpiderfyLatlng);
delete m._preSpiderfyLatlng;
//Hack override the location to be our center
- m._setPos(thisLayerPos);
-
- m.setOpacity(0);
+ if (m.setOpacity) {
+ m._setPos(thisLayerPos);
+ m.setOpacity(0);
+ } else {
+ fg.removeLayer(m);
+ }
//Animate the spider legs back in
if (svg) {
@@ -1875,8 +1895,10 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
}
- m.setOpacity(1);
- m.setZIndexOffset(0);
+ if (m.setOpacity) {
+ m.setOpacity(1);
+ m.setZIndexOffset(0);
+ }
if (stillThereChildCount > 1) {
fg.removeLayer(m);
diff --git a/dist/leaflet.markercluster.js b/dist/leaflet.markercluster.js
index 16a1a0b..2999e1f 100644
--- a/dist/leaflet.markercluster.js
+++ b/dist/leaflet.markercluster.js
@@ -3,4 +3,4 @@
https://github.com/Leaflet/Leaflet.markercluster
(c) 2012-2013, Dave Leaver, smartrak
*/
-!function(t,e){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureG [...]
\ No newline at end of file
+!function(t,e){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureG [...]
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git
More information about the Pkg-javascript-commits
mailing list