maplibre-gl-raster 0.1.1 → 0.1.2
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.
|
@@ -18470,7 +18470,7 @@ var RasterControl = class {
|
|
|
18470
18470
|
this._mapContainer.appendChild(this._panel);
|
|
18471
18471
|
this._layerManager = new LayerManager(map, { interleaved: this._options.interleaved });
|
|
18472
18472
|
this._forwardLayerManagerEvents(this._layerManager);
|
|
18473
|
-
const content = this._panel.querySelector(".
|
|
18473
|
+
const content = this._panel.querySelector(".mlr-control-content");
|
|
18474
18474
|
const autoLoading = this._options.autoLoad && !!this._options.defaultUrl;
|
|
18475
18475
|
if (content) this._panelUI = new PanelUI(content, this._layerManager, { defaultUrl: autoLoading ? "" : this._options.defaultUrl });
|
|
18476
18476
|
if (autoLoading) this._layerManager.addRaster(this._options.defaultUrl).catch(() => {});
|
|
@@ -18720,13 +18720,13 @@ var RasterControl = class {
|
|
|
18720
18720
|
*/
|
|
18721
18721
|
_createContainer() {
|
|
18722
18722
|
const container = document.createElement("div");
|
|
18723
|
-
container.className = `maplibregl-ctrl maplibregl-ctrl-group
|
|
18723
|
+
container.className = `maplibregl-ctrl maplibregl-ctrl-group mlr-control${this._options.className ? ` ${this._options.className}` : ""}`;
|
|
18724
18724
|
const toggleBtn = document.createElement("button");
|
|
18725
|
-
toggleBtn.className = "
|
|
18725
|
+
toggleBtn.className = "mlr-control-toggle";
|
|
18726
18726
|
toggleBtn.type = "button";
|
|
18727
18727
|
toggleBtn.setAttribute("aria-label", this._options.title);
|
|
18728
18728
|
toggleBtn.innerHTML = `
|
|
18729
|
-
<span class="
|
|
18729
|
+
<span class="mlr-control-icon">
|
|
18730
18730
|
<svg viewBox="0 0 24 24" width="22" height="22" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
18731
18731
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
|
|
18732
18732
|
<circle cx="8.5" cy="8.5" r="1.5"/>
|
|
@@ -18746,15 +18746,15 @@ var RasterControl = class {
|
|
|
18746
18746
|
*/
|
|
18747
18747
|
_createPanel() {
|
|
18748
18748
|
const panel = document.createElement("div");
|
|
18749
|
-
panel.className = "
|
|
18749
|
+
panel.className = "mlr-control-panel";
|
|
18750
18750
|
panel.style.width = `${this._options.panelWidth}px`;
|
|
18751
18751
|
const header = document.createElement("div");
|
|
18752
|
-
header.className = "
|
|
18752
|
+
header.className = "mlr-control-header";
|
|
18753
18753
|
const title = document.createElement("span");
|
|
18754
|
-
title.className = "
|
|
18754
|
+
title.className = "mlr-control-title";
|
|
18755
18755
|
title.textContent = this._options.title;
|
|
18756
18756
|
const closeBtn = document.createElement("button");
|
|
18757
|
-
closeBtn.className = "
|
|
18757
|
+
closeBtn.className = "mlr-control-close";
|
|
18758
18758
|
closeBtn.type = "button";
|
|
18759
18759
|
closeBtn.setAttribute("aria-label", "Close panel");
|
|
18760
18760
|
closeBtn.innerHTML = "×";
|
|
@@ -18762,7 +18762,7 @@ var RasterControl = class {
|
|
|
18762
18762
|
header.appendChild(title);
|
|
18763
18763
|
header.appendChild(closeBtn);
|
|
18764
18764
|
const content = document.createElement("div");
|
|
18765
|
-
content.className = "
|
|
18765
|
+
content.className = "mlr-control-content";
|
|
18766
18766
|
panel.appendChild(header);
|
|
18767
18767
|
panel.appendChild(content);
|
|
18768
18768
|
return panel;
|
|
@@ -18806,7 +18806,7 @@ var RasterControl = class {
|
|
|
18806
18806
|
*/
|
|
18807
18807
|
_updatePanelPosition() {
|
|
18808
18808
|
if (!this._container || !this._panel || !this._mapContainer) return;
|
|
18809
|
-
const button = this._container.querySelector(".
|
|
18809
|
+
const button = this._container.querySelector(".mlr-control-toggle");
|
|
18810
18810
|
if (!button) return;
|
|
18811
18811
|
const buttonRect = button.getBoundingClientRect();
|
|
18812
18812
|
const mapRect = this._mapContainer.getBoundingClientRect();
|
|
@@ -18843,4 +18843,4 @@ var RasterControl = class {
|
|
|
18843
18843
|
//#endregion
|
|
18844
18844
|
export { colormaps_default as _, debounce as a, throttle as c, percentileFromHistogram as d, readBandNames as f, COLORMAP_ROW_COUNT as g, COLORMAP_OPTIONS as h, classNames as i, MAX_SAMPLE_TILES as l, COLORMAP_NAMES as m, PALETTE_COLORMAP as n, formatNumericValue as o, loadGeoTIFF as p, clamp as r, generateId as s, RasterControl as t, computeAutoStats as u };
|
|
18845
18845
|
|
|
18846
|
-
//# sourceMappingURL=RasterControl-
|
|
18846
|
+
//# sourceMappingURL=RasterControl-C8Znszmf.js.map
|