@dra2020/baseclient 1.0.80 → 1.0.83
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;
|
|
@@ -112,6 +113,7 @@ export interface SessionUpdateProps {
|
|
|
112
113
|
accessUpdate?: AccessMap;
|
|
113
114
|
restore?: string;
|
|
114
115
|
revision?: Revision;
|
|
116
|
+
colors?: string;
|
|
115
117
|
}
|
|
116
118
|
export interface SessionsIndex {
|
|
117
119
|
[key: string]: SessionProps;
|
package/lib/colors/colors.ts
CHANGED
|
@@ -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
|
-
|
|
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];
|
package/lib/ot-js/otsession.ts
CHANGED
|
@@ -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 for redistricting)
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
// True to add, False to remove
|
|
@@ -140,6 +141,7 @@ export interface SessionUpdateProps
|
|
|
140
141
|
accessUpdate?: AccessMap;
|
|
141
142
|
restore?: string; // Revision ID
|
|
142
143
|
revision?: Revision; // If ID is empty, snap a new revision, otherwise label it.
|
|
144
|
+
colors?: string; // cached district colors (specific to OT for redistricting)
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
export interface SessionsIndex
|