@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.
@@ -9763,9 +9763,9 @@ function calculateLayerScale(name, scaleType, range, data) {
9763
9763
  let scaleColor = [];
9764
9764
  const { colors } = range;
9765
9765
  if (scaleType === "custom") {
9766
+ domain = calculateDomain(data, name, scaleType, colors.length);
9767
+ const [min2, max2] = domain;
9766
9768
  if (range.uiCustomScaleType === "logarithmic") {
9767
- domain = calculateDomain(data, name, scaleType, colors.length);
9768
- const [min2, max2] = domain;
9769
9769
  scaleDomain = getLog10ScaleSteps({
9770
9770
  min: min2,
9771
9771
  max: max2,
@@ -9774,8 +9774,9 @@ function calculateLayerScale(name, scaleType, range, data) {
9774
9774
  scaleColor = colors;
9775
9775
  } else if (range.colorMap) {
9776
9776
  const { colorMap } = range;
9777
+ scaleDomain = [];
9777
9778
  colorMap.forEach(([value, color2]) => {
9778
- domain.push(value);
9779
+ scaleDomain.push(Number(value));
9779
9780
  scaleColor.push(color2);
9780
9781
  });
9781
9782
  }