ol-elevation-profile 2.0.0 → 2.1.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p>
4
4
  <a href="https://www.npmjs.com/package/ol-elevation-profile"><img src="https://img.shields.io/npm/v/ol-elevation-profile.svg" alt="npm version"></a>
5
- <a href="https://openlayers.org/"><img src="https://img.shields.io/badge/OpenLayers-6%20%E2%80%93%2010.9.0-1f6feb.svg" alt="OpenLayers 6 to 10.9.0"></a>
5
+ <a href="https://openlayers.org/"><img src="https://img.shields.io/badge/OpenLayers-6%20to%2010.10.0-1f6feb.svg" alt="OpenLayers 6 to 10.10.0"></a>
6
6
  <a href="https://d3js.org/"><img src="https://img.shields.io/badge/d3-%E2%89%A5%207-f9a03c.svg" alt="d3 >= 7"></a>
7
7
  <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License: MIT"></a>
8
8
  </p>
@@ -24,8 +24,8 @@ It reads elevation (**Z**) directly from a track's geometry (`[lon, lat, z]` GPX
24
24
  The control expects `ol` and `d3` to be present as globals (provided by your map page):
25
25
 
26
26
  ```html
27
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@10.9.0/ol.css">
28
- <script src="https://cdn.jsdelivr.net/npm/ol@10.9.0/dist/ol.js"></script>
27
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ol@10.10.0/ol.css">
28
+ <script src="https://cdn.jsdelivr.net/npm/ol@10.10.0/dist/ol.js"></script>
29
29
  <script src="https://cdn.jsdelivr.net/npm/d3@7/dist/d3.min.js"></script>
30
30
 
31
31
  <link rel="stylesheet" href="ol-elevation-profile.css">
@@ -45,6 +45,9 @@ import OlElevationProfile from 'ol-elevation-profile'
45
45
  import 'ol-elevation-profile/css'
46
46
  ```
47
47
 
48
+ TypeScript needs nothing extra: the package ships its own declarations, generated from the
49
+ source's JSDoc, and both lines above are typed — the stylesheet subpath included.
50
+
48
51
  ## Usage
49
52
 
50
53
  ```js
package/dist/css.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ // `import 'ol-elevation-profile/css'` is a side-effect import of a stylesheet: there is
2
+ // nothing to type, but without a declaration TypeScript refuses the subpath outright
3
+ // (TS2882), and the README's own instructions would not compile.
4
+ export {};
@@ -83,6 +83,12 @@
83
83
  /* ---- terrain-model loading spinner ---- */
84
84
  /* Takes --oep-area, so it wears the theme colour - and the track colour under color:'auto'. */
85
85
  .oep-loading { display: flex; align-items: center; justify-content: center; }
86
+ /* Same box as the spinner, and for the same reason: it holds the chart's height, so the
87
+ panel does not jump if a profile turns up afterwards. */
88
+ .oep-noelev {
89
+ display: flex; align-items: center; justify-content: center;
90
+ font-size: 13px; opacity: .65; text-align: center; padding: 0 12px;
91
+ }
86
92
  .oep-spinner {
87
93
  width: 26px; height: 26px; box-sizing: border-box;
88
94
  border: 3px solid var(--oep-area);