maplibre-gl-layer-control 0.18.1 → 0.18.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.
- package/README.md +3 -1
- package/dist/index.cjs +486 -193
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +486 -193
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.ts +37 -5
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -281,7 +281,9 @@ The layer control displays visual symbols (colored icons) next to each layer nam
|
|
|
281
281
|
| `background` | Rectangle with inner border |
|
|
282
282
|
| Background group | Stacked layers icon |
|
|
283
283
|
|
|
284
|
-
The symbol color is automatically extracted from the layer's paint properties (e.g., `fill-color`, `line-color`, `circle-color`).
|
|
284
|
+
The symbol color is automatically extracted from the layer's paint properties (e.g., `fill-color`, `line-color`, `circle-color`). Standard CSS color strings are supported, including names, hex, RGB(A), and HSL(A); previews use six-digit RGB and ignore alpha. For `case`, `match`, and `interpolate` expressions, only result/output literals are inspected. The public `normalizeColor()` utility returns `null` for invalid values; invalid candidates are skipped, and a neutral gray is used when no color can be determined.
|
|
285
|
+
|
|
286
|
+
Line previews reflect `line-dasharray`, scaled to fit the swatch. Circle previews use `circle-stroke-color` for the border; setting `circle-stroke-width` to `0` removes the border.
|
|
285
287
|
|
|
286
288
|
To disable layer symbols:
|
|
287
289
|
|