@metoceanapi/wxtiles-common 0.0.11-1 → 0.0.12

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/fonts/barbs.woff CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metoceanapi/wxtiles-common",
3
- "version": "0.0.11-1",
3
+ "version": "0.0.12",
4
4
  "description": "Common resources shared by wxtiles mapbox and leaflet packages.",
5
5
  "exports": {
6
6
  "./*": "./*.ts",
@@ -293,8 +293,12 @@ function _printVectorsStatic<WxDatasetManagerT extends BaseDatasetManager>(
293
293
  ? style.vectorFactor * 0.5
294
294
  : 0.2; /*0.2 to fit font*/
295
295
  const vecCode =
296
- Math.min(~~(CLUT.DataToKnots(vecLen) * sm), 25 /* to fit .ttf */) +
297
- 65; /* A */
296
+ Math.min(
297
+ style.vectorType === "barbs"
298
+ ? Math.round(CLUT.DataToKnots(vecLen) * sm) // nearest 5 kn
299
+ : ~~(CLUT.DataToKnots(vecLen) * sm),
300
+ 25 /* to fit .ttf */,
301
+ ) + 65; /* A */
298
302
  const vecChar = String.fromCharCode(vecCode);
299
303
  switch (style.vectorColor) {
300
304
  case "inverted":