maplibre-gl-raster 0.5.0 → 0.6.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.
@@ -19568,6 +19568,11 @@ var SettingsSection = class {
19568
19568
  this._inspectBtn.classList.toggle("active", active);
19569
19569
  this._inspectBtn.setAttribute("aria-pressed", String(active));
19570
19570
  }
19571
+ /** Public hook to re-sync the inspect button after the host toggles inspect
19572
+ * mode programmatically (e.g. via RasterControl.setInspect). */
19573
+ syncInspect() {
19574
+ this._syncInspectButton();
19575
+ }
19571
19576
  /** Reacts to a LayerManager change event: rebuilds unless the change came
19572
19577
  * from this UI or a histogram drag is active (deferred until drag end). */
19573
19578
  notifyChange() {
@@ -20080,6 +20085,10 @@ var PanelUI = class {
20080
20085
  this._renderList();
20081
20086
  this._settings.render();
20082
20087
  }
20088
+ /** Reflects an externally-toggled inspect mode on the Settings inspect button. */
20089
+ syncInspect() {
20090
+ this._settings.syncInspect();
20091
+ }
20083
20092
  /** Detaches event handlers and removes the UI from the DOM. */
20084
20093
  destroy() {
20085
20094
  for (const off of this._unsubscribe) off();
@@ -20586,6 +20595,28 @@ var RasterControl = class {
20586
20595
  this._layerManager?.select(id);
20587
20596
  }
20588
20597
  /**
20598
+ * Toggles pixel-inspect mode on or off — the same mode the panel's Inspect
20599
+ * button drives. While active, a map click reads the source band values of
20600
+ * the selected raster (see {@link selectRaster}) at that point and shows them
20601
+ * in a popup. Lets a host application offer inspection from its own UI.
20602
+ *
20603
+ * @param enabled - `true` to start inspecting, `false` to stop
20604
+ */
20605
+ setInspect(enabled) {
20606
+ if (!this._inspector) return;
20607
+ if (enabled) this._inspector.enable();
20608
+ else this._inspector.disable();
20609
+ this._panelUI?.syncInspect();
20610
+ }
20611
+ /**
20612
+ * Whether pixel-inspect mode is currently active.
20613
+ *
20614
+ * @returns `true` while inspecting
20615
+ */
20616
+ isInspecting() {
20617
+ return this._inspector?.enabled ?? false;
20618
+ }
20619
+ /**
20589
20620
  * Gets the active rendering engine.
20590
20621
  *
20591
20622
  * @returns The current engine, or the configured default before the control
@@ -20958,6 +20989,6 @@ var RasterControl = class {
20958
20989
  }
20959
20990
  };
20960
20991
  //#endregion
20961
- export { computeAutoStats as C, createResilientEpsgResolver as E, MAX_SAMPLE_TILES as S, readBandNames as T, COLORMAP_ROW_COUNT as _, loadColormapSprite as a, autoRangeFor as b, classNames as c, generateId as d, throttle as f, COLORMAP_OPTIONS as g, COLORMAP_NAMES as h, isKnownColormap as i, debounce as l, COLORMAP_DISPLAY_NAMES as m, Colorbar as n, sampleColormapStops as o, loadGeoTIFF as p, PALETTE_COLORMAP as r, clamp as s, RasterControl as t, formatNumericValue as u, colormapDisplayName as v, percentileFromHistogram as w, statsForBand as x, colormaps_default as y };
20992
+ export { MAX_SAMPLE_TILES as C, createResilientEpsgResolver as D, readBandNames as E, statsForBand as S, percentileFromHistogram as T, COLORMAP_OPTIONS as _, isKnownColormap as a, colormaps_default as b, clamp as c, formatNumericValue as d, generateId as f, COLORMAP_NAMES as g, COLORMAP_DISPLAY_NAMES as h, PALETTE_COLORMAP as i, classNames as l, loadGeoTIFF as m, Colorbar as n, loadColormapSprite as o, throttle as p, readPixelValues as r, sampleColormapStops as s, RasterControl as t, debounce as u, COLORMAP_ROW_COUNT as v, computeAutoStats as w, autoRangeFor as x, colormapDisplayName as y };
20962
20993
 
20963
- //# sourceMappingURL=RasterControl-vzjXiCsa.js.map
20994
+ //# sourceMappingURL=RasterControl-BRFVTd2x.js.map