@nextgis/leaflet-map-adapter 4.0.0-rc.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/leaflet-map-adapter.esm-browser.js +12 -3
- package/lib/leaflet-map-adapter.esm-browser.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js +1 -1
- package/lib/leaflet-map-adapter.esm-browser.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.js +12 -3
- package/lib/leaflet-map-adapter.esm-bundler.js.map +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.prod.js +1 -1
- package/lib/leaflet-map-adapter.esm-bundler.prod.js.map +1 -1
- package/lib/leaflet-map-adapter.global.js +12 -3
- package/lib/leaflet-map-adapter.global.js.map +1 -1
- package/lib/leaflet-map-adapter.global.prod.js +1 -1
- package/lib/leaflet-map-adapter.global.prod.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/leaflet-map-adapter; version: 4.0.0
|
|
1
|
+
/** Bundle of @nextgis/leaflet-map-adapter; version: 4.0.0; author: NextGIS */
|
|
2
2
|
function getElement(el) {
|
|
3
3
|
if (typeof el === "string") {
|
|
4
4
|
let el_ = document.getElementById(el);
|
|
@@ -15494,13 +15494,22 @@ class BaseAdapter {
|
|
|
15494
15494
|
__publicField$8(this, "options", options);
|
|
15495
15495
|
__publicField$8(this, "layer");
|
|
15496
15496
|
__publicField$8(this, "pane", "order-0");
|
|
15497
|
+
var _a, _b;
|
|
15497
15498
|
if (options.order !== void 0) {
|
|
15498
|
-
const
|
|
15499
|
+
const order = options.order;
|
|
15500
|
+
const pane = "order-" + order;
|
|
15499
15501
|
let exist = map.getPane(pane);
|
|
15500
15502
|
if (!exist) {
|
|
15501
15503
|
exist = map.createPane(pane);
|
|
15504
|
+
const nextPane = (_a = Object.entries(map.getPanes()).filter(([name]) => name.startsWith("order-")).map(([name, element]) => ({
|
|
15505
|
+
element,
|
|
15506
|
+
order: Number(name.slice("order-".length))
|
|
15507
|
+
})).filter((candidate) => candidate.order > order).sort((a, b) => a.order - b.order)[0]) == null ? void 0 : _a.element;
|
|
15508
|
+
if (nextPane) {
|
|
15509
|
+
(_b = exist.parentElement) == null ? void 0 : _b.insertBefore(exist, nextPane);
|
|
15510
|
+
}
|
|
15502
15511
|
}
|
|
15503
|
-
exist.style.zIndex = String(Math.round(
|
|
15512
|
+
exist.style.zIndex = String(Math.round(order * 100));
|
|
15504
15513
|
this.pane = pane;
|
|
15505
15514
|
}
|
|
15506
15515
|
}
|