@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 +0 -0
- package/package.json +1 -1
- package/wxlayer/painter.ts +6 -2
package/fonts/barbs.woff
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/wxlayer/painter.ts
CHANGED
|
@@ -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(
|
|
297
|
-
|
|
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":
|