@carto/api-client 0.5.15-alpha.raster-3 → 0.5.15-alpha.raster-4
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/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"homepage": "https://github.com/CartoDB/carto-api-client#readme",
|
|
9
9
|
"author": "Don McCurdy <donmccurdy@carto.com>",
|
|
10
10
|
"packageManager": "yarn@4.3.1",
|
|
11
|
-
"version": "0.5.15-alpha.raster-
|
|
11
|
+
"version": "0.5.15-alpha.raster-4",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
@@ -379,9 +379,9 @@ export function calculateLayerScale(
|
|
|
379
379
|
const {colors} = range;
|
|
380
380
|
|
|
381
381
|
if (scaleType === 'custom') {
|
|
382
|
+
domain = calculateDomain(data, name, scaleType, colors.length);
|
|
383
|
+
const [min, max] = domain as number[];
|
|
382
384
|
if (range.uiCustomScaleType === 'logarithmic') {
|
|
383
|
-
domain = calculateDomain(data, name, scaleType, colors.length);
|
|
384
|
-
const [min, max] = domain as number[];
|
|
385
385
|
scaleDomain = getLog10ScaleSteps({
|
|
386
386
|
min,
|
|
387
387
|
max,
|
|
@@ -391,8 +391,9 @@ export function calculateLayerScale(
|
|
|
391
391
|
scaleColor = colors;
|
|
392
392
|
} else if (range.colorMap) {
|
|
393
393
|
const {colorMap} = range;
|
|
394
|
+
scaleDomain = [];
|
|
394
395
|
colorMap.forEach(([value, color]) => {
|
|
395
|
-
(
|
|
396
|
+
(scaleDomain as number[]).push(Number(value));
|
|
396
397
|
scaleColor.push(color);
|
|
397
398
|
});
|
|
398
399
|
}
|