maplibre-gl-raster 0.14.13 → 0.14.14
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/dist/{RasterControl-6TZSLwPL.js → RasterControl-BlJnbnow.js} +14 -6
- package/dist/{RasterControl-6TZSLwPL.js.map → RasterControl-BlJnbnow.js.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/react.d.ts +5 -0
- package/package.json +1 -1
|
@@ -22633,6 +22633,13 @@ var PANEL_MIN_WIDTH = 260;
|
|
|
22633
22633
|
var PANEL_MIN_HEIGHT = 180;
|
|
22634
22634
|
/** Breathing room kept between a resized panel and the map edges. */
|
|
22635
22635
|
var PANEL_EDGE_MARGIN = 12;
|
|
22636
|
+
/** Corners a control can be docked in, as both engines name them. */
|
|
22637
|
+
var CONTROL_CORNERS = [
|
|
22638
|
+
"top-left",
|
|
22639
|
+
"top-right",
|
|
22640
|
+
"bottom-left",
|
|
22641
|
+
"bottom-right"
|
|
22642
|
+
];
|
|
22636
22643
|
/**
|
|
22637
22644
|
* A MapLibre GL control for visualizing local and remote raster datasets
|
|
22638
22645
|
* (GeoTIFF / Cloud Optimized GeoTIFF). A collapsible button expands into a
|
|
@@ -23298,16 +23305,17 @@ var RasterControl = class {
|
|
|
23298
23305
|
/**
|
|
23299
23306
|
* Detect which corner the control is positioned in.
|
|
23300
23307
|
*
|
|
23308
|
+
* Both class prefixes are recognised: a control added to a mapbox-gl map
|
|
23309
|
+
* lands in a `mapboxgl-ctrl-*` corner rather than a `maplibregl-ctrl-*` one,
|
|
23310
|
+
* and reading only the MapLibre class would anchor the panel to the default
|
|
23311
|
+
* top-right — on top of whatever else sits in that corner.
|
|
23312
|
+
*
|
|
23301
23313
|
* @returns The position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
|
|
23302
23314
|
*/
|
|
23303
23315
|
_getControlPosition() {
|
|
23304
23316
|
const parent = this._container?.parentElement;
|
|
23305
23317
|
if (!parent) return "top-right";
|
|
23306
|
-
|
|
23307
|
-
if (parent.classList.contains("maplibregl-ctrl-top-right")) return "top-right";
|
|
23308
|
-
if (parent.classList.contains("maplibregl-ctrl-bottom-left")) return "bottom-left";
|
|
23309
|
-
if (parent.classList.contains("maplibregl-ctrl-bottom-right")) return "bottom-right";
|
|
23310
|
-
return "top-right";
|
|
23318
|
+
return CONTROL_CORNERS.find((name) => parent.classList.contains(`maplibregl-ctrl-${name}`) || parent.classList.contains(`mapboxgl-ctrl-${name}`)) ?? "top-right";
|
|
23311
23319
|
}
|
|
23312
23320
|
/**
|
|
23313
23321
|
* Update the panel position based on button location and control corner.
|
|
@@ -23358,4 +23366,4 @@ var RasterControl = class {
|
|
|
23358
23366
|
//#endregion
|
|
23359
23367
|
export { PlanarConfiguration as $, TITILER_TMS as A, colormapDisplayName as B, VrtUnsupportedError as C, parseVrt as D, loadVrt as E, sampleColormapStops as F, MAX_SAMPLE_TILES as G, DEFAULT_INDEX_RANGE as H, COLORMAP_DISPLAY_NAMES as I, mergeBandStats as J, computeAutoStats as K, COLORMAP_NAMES as L, PALETTE_COLORMAP as M, isKnownColormap as N, loadGeoTIFF as O, loadColormapSprite as P, Photometric as Q, COLORMAP_OPTIONS as R, throttle as S, isVrtUrl as T, autoRangeFor as U, colormaps_default as V, statsForBand as W, readBandNames as X, percentileFromHistogram as Y, Compression as Z, clamp as _, NORMALIZED_DIFFERENCE_INDICES as a, createResilientEpsgResolver as at, formatNumericValue as b, DEFAULT_ENGINE as c, MosaicUnsupportedError as d, Predictor as et, assetUrlToHttps as f, parseMosaic as g, mosaicMinZoom as h, CUSTOM_NORMALIZED_DIFFERENCE as i, readRasterWindow as it, isMosaicJsonUrl as j, DEFAULT_TITILER_ENDPOINT as k, LayerManager as l, mosaicInitialView as m, Colorbar as n, TiffTag as nt, guessBandForRole as o, loadMosaic as p, mergeAutoStats as q, CUSTOM_INDEX_ID as r, readPixelValues as rt, indexById as s, RasterControl as t, SampleFormat as tt, MAX_MOSAIC_ASSETS as u, classNames as v, isVrtFile as w, generateId as x, debounce as y, COLORMAP_ROW_COUNT as z };
|
|
23360
23368
|
|
|
23361
|
-
//# sourceMappingURL=RasterControl-
|
|
23369
|
+
//# sourceMappingURL=RasterControl-BlJnbnow.js.map
|