[Pkg-javascript-commits] [leaflet-markercluster] 254/479: Fix up SVG Detection, allows us to work with canvas. Fixes #67
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:37 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 b97def88f97e635c74d42fa580bc81f6856587ef
Author: danzel <danzel at localhost.geek.nz>
Date: Fri Sep 28 09:14:06 2012 +1200
Fix up SVG Detection, allows us to work with canvas. Fixes #67
---
src/MarkerCluster.Spiderfier.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/MarkerCluster.Spiderfier.js b/src/MarkerCluster.Spiderfier.js
index 85dd659..2b52a2f 100644
--- a/src/MarkerCluster.Spiderfier.js
+++ b/src/MarkerCluster.Spiderfier.js
@@ -154,7 +154,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
group._forceLayout();
group._animationStart();
- var initialLegOpacity = L.Browser.svg ? 0 : 0.3,
+ var initialLegOpacity = L.Path.SVG ? 0 : 0.3,
xmlns = L.Path.SVG_NS;
@@ -174,7 +174,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
m._spiderLeg = leg;
//Following animations don't work for canvas
- if (!L.Browser.svg) {
+ if (!L.Path.SVG) {
continue;
}
@@ -211,7 +211,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
//Set the opacity of the spiderLegs back to their correct value
// The animations above override this until they complete.
// If the initial opacity of the spiderlegs isn't 0 then they appear before the animation starts.
- if (L.Browser.svg) {
+ if (L.Path.SVG) {
this._group._forceLayout();
for (i = childMarkers.length - 1; i >= 0; i--) {
@@ -233,7 +233,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
map = group._map,
thisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng),
childMarkers = this.getAllChildMarkers(),
- svg = L.Browser.svg,
+ svg = L.Path.SVG,
m, i, a;
group._animationStart();
@@ -317,7 +317,7 @@ L.MarkerClusterGroup.include({
this._map.on('zoomend', this._unspiderfyWrapper, this);
}
- if (L.Browser.svg && !L.Browser.touch) {
+ if (L.Path.SVG && !L.Browser.touch) {
this._map._initPathRoot();
//Needs to happen in the pageload, not after, or animations don't work in webkit
// http://stackoverflow.com/questions/8455200/svg-animate-with-dynamically-added-elements
--
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