@dra2020/baseclient 1.0.79 → 1.0.82

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.
@@ -94,6 +94,7 @@ export interface SessionProps {
94
94
  };
95
95
  groups: any;
96
96
  xid?: string;
97
+ colors?: string;
97
98
  }
98
99
  export declare type LabelUpdate = {
99
100
  [name: string]: boolean | null;
@@ -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))
@@ -120,6 +120,7 @@ export interface SessionProps
120
120
  xprops?: { [prop: string]: string };
121
121
  groups: any; // DT.GroupsMapIndex
122
122
  xid?: string; // external ID
123
+ colors?: string; // cached district colors (specific to OT redistricting)
123
124
  }
124
125
 
125
126
  // True to add, False to remove
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dra2020/baseclient",
3
- "version": "1.0.79",
3
+ "version": "1.0.82",
4
4
  "description": "Utility functions for Javascript projects.",
5
5
  "main": "dist/baseclient.js",
6
6
  "types": "./dist/all/all.d.ts",