[Pkg-javascript-commits] [leaflet-markercluster] 24/128: Fix spiderfySpec tests

Jonas Smedegaard dr at jones.dk
Sun Apr 16 06:26:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit 9f6125501c93560d61f3c9450c18e0a6b849b56e
Author: danzel <danzel at localhost.geek.nz>
Date:   Tue Dec 22 11:06:14 2015 +1300

    Fix spiderfySpec tests
---
 spec/suites/spiderfySpec.js     | 6 +++---
 src/MarkerCluster.Spiderfier.js | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/spec/suites/spiderfySpec.js b/spec/suites/spiderfySpec.js
index f2ffc77..bd1aaa4 100644
--- a/spec/suites/spiderfySpec.js
+++ b/spec/suites/spiderfySpec.js
@@ -138,7 +138,7 @@
 
 		expect(zoom).to.be.lessThan(10);
 
-		cluster.fireEvent('click');
+		cluster.fireEvent('click', null, true);
 
 		clock.tick(1000);
 
@@ -171,7 +171,7 @@
 
 		expect(zoom).to.be.lessThan(10);
 
-		cluster.fireEvent('click');
+		cluster.fireEvent('click', null, true);
 
 		clock.tick(1000);
 
@@ -195,7 +195,7 @@
 		marker.__parent.spiderfy();
 
 		expect(map._panes.markerPane.childNodes.length).to.be(3); // The 2 markers + semi-transparent cluster.
-		expect(map._pathRoot.childNodes.length).to.be(2); // The 2 spider legs.
+		expect(map.getPane('overlayPane').firstChild.firstChild.childNodes.length).to.be(2); // The 2 spider legs.
 
 	});
 
diff --git a/src/MarkerCluster.Spiderfier.js b/src/MarkerCluster.Spiderfier.js
index f6924e1..9b769b9 100644
--- a/src/MarkerCluster.Spiderfier.js
+++ b/src/MarkerCluster.Spiderfier.js
@@ -233,7 +233,7 @@ L.MarkerCluster.include({
 			}
 			
 			// Vectors just get immediately added
-				fg.addLayer(m);
+			fg.addLayer(m);
 
 			if (m._setPos) {
 				m._setPos(thisLayerPos);

-- 
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