/
opt
/
canhelp
/
node_modules
/
leaflet.markercluster
/
spec
/
suites
/
/opt/canhelp/node_modules/leaflet.markercluster/spec/suites
mkdir
upload
Name
Size
Mode
Actions
AddLayer.MultipleSpec.js
4738
0755
edit
dl
rm
AddLayer.SingleSpec.js
2928
0755
edit
dl
rm
AddLayersSpec.js
4534
0755
edit
dl
rm
animateOptionSpec.js
3843
0755
edit
dl
rm
ChildChangingIconSupportSpec.js
1462
0755
edit
dl
rm
CircleMarkerSupportSpec.js
3925
0755
edit
dl
rm
CircleSupportSpec.js
3792
0755
edit
dl
rm
clearLayersSpec.js
1411
0755
edit
dl
rm
disableClusteringAtZoomSpec.js
1439
0755
edit
dl
rm
DistanceGridSpec.js
1031
0755
edit
dl
rm
eachLayerSpec.js
1557
0755
edit
dl
rm
eventsSpec.js
9747
0755
edit
dl
rm
getBoundsSpec.js
3986
0755
edit
dl
rm
getLayersSpec.js
1920
0755
edit
dl
rm
getVisibleParentSpec.js
1698
0755
edit
dl
rm
LeafletSpec.js
159
0755
edit
dl
rm
markerMoveSupportSpec.js
1657
0755
edit
dl
rm
nonIntegerZoomSpec.js
1234
0755
edit
dl
rm
NonPointSpec.js
6331
0755
edit
dl
rm
onAddSpec.js
1339
0755
edit
dl
rm
onRemoveSpec.js
1117
0755
edit
dl
rm
PaneSpec.js
1570
0755
edit
dl
rm
QuickHullSpec.js
1422
0755
edit
dl
rm
RefreshSpec.js
12929
0755
edit
dl
rm
RememberOpacity.js
4170
0755
edit
dl
rm
RemoveLayerSpec.js
4975
0755
edit
dl
rm
removeLayersSpec.js
4534
0755
edit
dl
rm
removeOutsideVisibleBoundsSpec.js
7234
0755
edit
dl
rm
singleMarkerModeSpec.js
1705
0755
edit
dl
rm
SpecHelper.js
641
0755
edit
dl
rm
spiderfySpec.js
8851
0755
edit
dl
rm
supportNegativeZoomSpec.js
2374
0755
edit
dl
rm
unspiderfySpec.js
2806
0755
edit
dl
rm
zoomAnimationSpec.js
12623
0755
edit
dl
rm
Edit:
/opt/canhelp/node_modules/leaflet.markercluster/spec/suites/animateOptionSpec.js
(3843B)
describe('animate option', function () { ///////////////////////////// // SETUP FOR EACH TEST ///////////////////////////// var div, map, group; beforeEach(function () { div = document.createElement('div'); div.style.width = '200px'; div.style.height = '200px'; document.body.appendChild(div); map = L.map(div, { maxZoom: 18, trackResize: false }); // Corresponds to zoom level 8 for the above div dimensions. map.fitBounds(new L.LatLngBounds([ [1, 1], [2, 2] ])); }); afterEach(function () { if (group instanceof L.MarkerClusterGroup) { group.removeLayers(group.getLayers()); map.removeLayer(group); } map.remove(); div.remove(); div = map = group = null; }); ///////////////////////////// // TESTS ///////////////////////////// it('hooks animated methods version by default', function () { // Need to add to map so that we have the top cluster level created. group = L.markerClusterGroup().addTo(map); var withAnimation = L.MarkerClusterGroup.prototype._withAnimation; // MCG animated methods. expect(group._animationStart).to.be(withAnimation._animationStart); expect(group._animationZoomIn).to.be(withAnimation._animationZoomIn); expect(group._animationZoomOut).to.be(withAnimation._animationZoomOut); expect(group._animationAddLayer).to.be(withAnimation._animationAddLayer); // MarkerCluster spiderfy animated methods var cluster = group._topClusterLevel; withAnimation = L.MarkerCluster.prototype; expect(cluster._animationSpiderfy).to.be(withAnimation._animationSpiderfy); expect(cluster._animationUnspiderfy).to.be(withAnimation._animationUnspiderfy); }); it('hooks non-animated methods version when set to false', function () { // Need to add to map so that we have the top cluster level created. group = L.markerClusterGroup({animate: false}).addTo(map); var noAnimation = L.MarkerClusterGroup.prototype._noAnimation; // MCG non-animated methods. expect(group._animationStart).to.be(noAnimation._animationStart); expect(group._animationZoomIn).to.be(noAnimation._animationZoomIn); expect(group._animationZoomOut).to.be(noAnimation._animationZoomOut); expect(group._animationAddLayer).to.be(noAnimation._animationAddLayer); // MarkerCluster spiderfy non-animated methods var cluster = group._topClusterLevel; noAnimation = L.MarkerClusterNonAnimated.prototype; expect(cluster._animationSpiderfy).to.be(noAnimation._animationSpiderfy); expect(cluster._animationUnspiderfy).to.be(noAnimation._animationUnspiderfy); }); it('always hooks non-animated methods version when L.DomUtil.TRANSITION is false', function () { // Fool Leaflet, make it think the browser does not support transitions. var realDomUtil = L.DomUtil; var fakeDomUtil = {}; for (k in realDomUtil) { fakeDomUtil[k] = realDomUtil[k]; } fakeDomUtil.TRANSITION = false; L.DomUtil = fakeDomUtil; try { // Need to add to map so that we have the top cluster level created. group = L.markerClusterGroup({animate: true}).addTo(map); var noAnimation = L.MarkerClusterGroup.prototype._noAnimation; // MCG non-animated methods. expect(group._animationStart).to.be(noAnimation._animationStart); expect(group._animationZoomIn).to.be(noAnimation._animationZoomIn); expect(group._animationZoomOut).to.be(noAnimation._animationZoomOut); expect(group._animationAddLayer).to.be(noAnimation._animationAddLayer); // MarkerCluster spiderfy non-animated methods var cluster = group._topClusterLevel; noAnimation = L.MarkerClusterNonAnimated.prototype; expect(cluster._animationSpiderfy).to.be(noAnimation._animationSpiderfy); expect(cluster._animationUnspiderfy).to.be(noAnimation._animationUnspiderfy); } finally { //Undo the DomUtil replacement hack L.DomUtil = realDomUtil; } }); });
Save
cmd:
run