@dra2020/baseclient 1.0.78 → 1.0.81

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.
@@ -335,7 +335,10 @@ export function orderedColors(palette: string): string[]
335
335
  OrderedColorTable[palette] = [];
336
336
  for (let i: number = 0; i < MaxColors; i++)
337
337
  {
338
- OrderedColorTable[palette].push(colors[DistrictsColorOrder[i] * 3]);
338
+ if (palette === 'jet_r' || palette === 'turbo_r')
339
+ OrderedColorTable[palette].push(colors[Math.floor(DistrictsColorOrder[i] * 2.5) + 12]);
340
+ else
341
+ OrderedColorTable[palette].push(colors[DistrictsColorOrder[i] * 3]);
339
342
  }
340
343
  }
341
344
  return OrderedColorTable[palette];
@@ -397,6 +400,7 @@ function getColorTable(palette: string): string[]
397
400
  ColorTable[palette].push(EthnicBackgroundColor[i]);
398
401
  return ColorTable[palette];
399
402
  }
403
+ return ColorTable[palette];
400
404
  }
401
405
 
402
406
  if (allPaletteNames.includes(palette))
@@ -208,6 +208,9 @@ export function polyPack(coords: any, prepack?: PolyPack): PolyPack
208
208
  // Null feature?
209
209
  if (coords == null || (coords.length !== undefined && coords.length == 0)) return null;
210
210
 
211
+ // Null geometry?
212
+ if (coords && coords.type === 'Feature' && coords.geometry == null) return null;
213
+
211
214
  // Actually already a PolyPack?
212
215
  if (coords.offset !== undefined) return coords as PolyPack;
213
216
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dra2020/baseclient",
3
- "version": "1.0.78",
3
+ "version": "1.0.81",
4
4
  "description": "Utility functions for Javascript projects.",
5
5
  "main": "dist/baseclient.js",
6
6
  "types": "./dist/all/all.d.ts",