UNPKG

leaflet-markercluster-utils

Version:
18 lines 772 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.openCluster = void 0; const get_spiderfied_cluster_1 = require("./get-spiderfied-cluster"); function openCluster(clusterLayer, cluster, onFinish) { const spiderfied = (0, get_spiderfied_cluster_1.getSpiderfiedCluster)(clusterLayer); if (onFinish) clusterLayer.once('spiderfied', onFinish); if (!spiderfied) return cluster.spiderfy(); if ((spiderfied === null || spiderfied === void 0 ? void 0 : spiderfied._leaflet_id) === cluster._leaflet_id) return; if (spiderfied) spiderfied.unspiderfy(); clusterLayer.once('unspiderfied', () => cluster.spiderfy()); } exports.openCluster = openCluster; //# sourceMappingURL=open-cluster.js.map