@vitessce/scatterplot 3.4.14 → 3.5.0

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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-eee2d28f.js";
2
+ import { B as BaseDecoder } from "./index-0fd62e4a.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -73744,7 +73744,7 @@ keysShim.shim = function shimObjectKeys() {
73744
73744
  return Object.keys || keysShim;
73745
73745
  };
73746
73746
  var objectKeys$1 = keysShim;
73747
- var shams$2 = function hasSymbols() {
73747
+ var shams$1 = function hasSymbols() {
73748
73748
  if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
73749
73749
  return false;
73750
73750
  }
@@ -73789,9 +73789,9 @@ var shams$2 = function hasSymbols() {
73789
73789
  }
73790
73790
  return true;
73791
73791
  };
73792
- var hasSymbols$4 = shams$2;
73793
- var shams$1 = function hasToStringTagShams() {
73794
- return hasSymbols$4() && !!Symbol.toStringTag;
73792
+ var hasSymbols$3 = shams$1;
73793
+ var shams = function hasToStringTagShams() {
73794
+ return hasSymbols$3() && !!Symbol.toStringTag;
73795
73795
  };
73796
73796
  var esErrors = Error;
73797
73797
  var _eval = EvalError;
@@ -73801,8 +73801,8 @@ var syntax = SyntaxError;
73801
73801
  var type = TypeError;
73802
73802
  var uri = URIError;
73803
73803
  var origSymbol = typeof Symbol !== "undefined" && Symbol;
73804
- var hasSymbolSham = shams$2;
73805
- var hasSymbols$3 = function hasNativeSymbols() {
73804
+ var hasSymbolSham = shams$1;
73805
+ var hasSymbols$2 = function hasNativeSymbols() {
73806
73806
  if (typeof origSymbol !== "function") {
73807
73807
  return false;
73808
73808
  }
@@ -73818,11 +73818,12 @@ var hasSymbols$3 = function hasNativeSymbols() {
73818
73818
  return hasSymbolSham();
73819
73819
  };
73820
73820
  var test = {
73821
+ __proto__: null,
73821
73822
  foo: {}
73822
73823
  };
73823
73824
  var $Object$1 = Object;
73824
73825
  var hasProto$1 = function hasProto() {
73825
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
73826
+ return { __proto__: test }.foo === test.foo && !(test instanceof $Object$1);
73826
73827
  };
73827
73828
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
73828
73829
  var toStr$2 = Object.prototype.toString;
@@ -73937,7 +73938,7 @@ var ThrowTypeError = $gOPD$2 ? function() {
73937
73938
  }
73938
73939
  }
73939
73940
  }() : throwTypeError;
73940
- var hasSymbols$2 = hasSymbols$3();
73941
+ var hasSymbols$1 = hasSymbols$2();
73941
73942
  var hasProto2 = hasProto$1();
73942
73943
  var getProto$1 = Object.getPrototypeOf || (hasProto2 ? function(x2) {
73943
73944
  return x2.__proto__;
@@ -73949,7 +73950,7 @@ var INTRINSICS = {
73949
73950
  "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
73950
73951
  "%Array%": Array,
73951
73952
  "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
73952
- "%ArrayIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
73953
+ "%ArrayIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
73953
73954
  "%AsyncFromSyncIteratorPrototype%": undefined$1,
73954
73955
  "%AsyncFunction%": needsEval,
73955
73956
  "%AsyncGenerator%": needsEval,
@@ -73980,10 +73981,10 @@ var INTRINSICS = {
73980
73981
  "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
73981
73982
  "%isFinite%": isFinite,
73982
73983
  "%isNaN%": isNaN,
73983
- "%IteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
73984
+ "%IteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
73984
73985
  "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
73985
73986
  "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
73986
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
73987
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
73987
73988
  "%Math%": Math,
73988
73989
  "%Number%": Number,
73989
73990
  "%Object%": Object,
@@ -73996,11 +73997,11 @@ var INTRINSICS = {
73996
73997
  "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
73997
73998
  "%RegExp%": RegExp,
73998
73999
  "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
73999
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
74000
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols$1 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
74000
74001
  "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
74001
74002
  "%String%": String,
74002
- "%StringIteratorPrototype%": hasSymbols$2 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
74003
- "%Symbol%": hasSymbols$2 ? Symbol : undefined$1,
74003
+ "%StringIteratorPrototype%": hasSymbols$1 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
74004
+ "%Symbol%": hasSymbols$1 ? Symbol : undefined$1,
74004
74005
  "%SyntaxError%": $SyntaxError$1,
74005
74006
  "%ThrowTypeError%": ThrowTypeError,
74006
74007
  "%TypedArray%": TypedArray,
@@ -74369,7 +74370,7 @@ var callBound$2 = function callBoundIntrinsic(name2, allowMissing) {
74369
74370
  }
74370
74371
  return intrinsic;
74371
74372
  };
74372
- var hasToStringTag$2 = shams$1();
74373
+ var hasToStringTag$2 = shams();
74373
74374
  var callBound$1 = callBound$2;
74374
74375
  var $toString$1 = callBound$1("Object.prototype.toString");
74375
74376
  var isStandardArguments = function isArguments2(value) {
@@ -74414,7 +74415,7 @@ hasPropertyDescriptors2.hasArrayLengthDefineBug = function hasArrayLengthDefineB
74414
74415
  };
74415
74416
  var hasPropertyDescriptors_1 = hasPropertyDescriptors2;
74416
74417
  var keys$1 = objectKeys$1;
74417
- var hasSymbols$1 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
74418
+ var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
74418
74419
  var toStr$1 = Object.prototype.toString;
74419
74420
  var concat = Array.prototype.concat;
74420
74421
  var defineDataProperty2 = defineDataProperty$1;
@@ -74441,7 +74442,7 @@ var defineProperty$3 = function(object2, name2, value, predicate) {
74441
74442
  var defineProperties = function(object2, map2) {
74442
74443
  var predicates = arguments.length > 2 ? arguments[2] : {};
74443
74444
  var props = keys$1(map2);
74444
- if (hasSymbols$1) {
74445
+ if (hasSymbols2) {
74445
74446
  props = concat.call(props, Object.getOwnPropertySymbols(map2));
74446
74447
  }
74447
74448
  for (var i2 = 0; i2 < props.length; i2 += 1) {
@@ -74492,10 +74493,6 @@ define$2(polyfill$1, {
74492
74493
  shim: shim$2
74493
74494
  });
74494
74495
  var objectIs = polyfill$1;
74495
- var hasSymbols2 = shams$2;
74496
- var shams = function hasToStringTagShams2() {
74497
- return hasSymbols2() && !!Symbol.toStringTag;
74498
- };
74499
74496
  var callBound = callBound$2;
74500
74497
  var hasToStringTag$1 = shams();
74501
74498
  var has$3;
@@ -74702,7 +74699,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
74702
74699
  };
74703
74700
  var toStr = Object.prototype.toString;
74704
74701
  var dateClass = "[object Date]";
74705
- var hasToStringTag = shams$1();
74702
+ var hasToStringTag = shams();
74706
74703
  var isDateObject = function isDateObject2(value) {
74707
74704
  if (typeof value !== "object" || value === null) {
74708
74705
  return false;
@@ -108022,16 +108019,16 @@ function addDecoder(cases, importFn) {
108022
108019
  }
108023
108020
  cases.forEach((c2) => registry$1.set(c2, importFn));
108024
108021
  }
108025
- addDecoder([void 0, 1], () => import("./raw-3ece8be3.js").then((m2) => m2.default));
108026
- addDecoder(5, () => import("./lzw-d2cff9a8.js").then((m2) => m2.default));
108022
+ addDecoder([void 0, 1], () => import("./raw-686ef1b1.js").then((m2) => m2.default));
108023
+ addDecoder(5, () => import("./lzw-12f5daf8.js").then((m2) => m2.default));
108027
108024
  addDecoder(6, () => {
108028
108025
  throw new Error("old style JPEG compression is not supported.");
108029
108026
  });
108030
- addDecoder(7, () => import("./jpeg-7c226d63.js").then((m2) => m2.default));
108031
- addDecoder([8, 32946], () => import("./deflate-a9048cdd.js").then((m2) => m2.default));
108032
- addDecoder(32773, () => import("./packbits-43302cb2.js").then((m2) => m2.default));
108033
- addDecoder(34887, () => import("./lerc-0384b6ad.js").then((m2) => m2.default));
108034
- addDecoder(50001, () => import("./webimage-4065dcff.js").then((m2) => m2.default));
108027
+ addDecoder(7, () => import("./jpeg-cb535ab0.js").then((m2) => m2.default));
108028
+ addDecoder([8, 32946], () => import("./deflate-c981dfb9.js").then((m2) => m2.default));
108029
+ addDecoder(32773, () => import("./packbits-7d462060.js").then((m2) => m2.default));
108030
+ addDecoder(34887, () => import("./lerc-263d6f89.js").then((m2) => m2.default));
108031
+ addDecoder(50001, () => import("./webimage-07e9e96a.js").then((m2) => m2.default));
108035
108032
  function decodeRowAcc(row, stride) {
108036
108033
  let length2 = row.length - stride;
108037
108034
  let offset5 = 0;
@@ -132994,6 +132991,7 @@ const CELLS_LAYER_ID = "scatterplot";
132994
132991
  const LABEL_FONT_FAMILY = "-apple-system, 'Helvetica Neue', Arial, sans-serif";
132995
132992
  const NUM_FORCE_SIMULATION_TICKS = 100;
132996
132993
  const LABEL_UPDATE_ZOOM_DELTA = 0.25;
132994
+ const POINT_LAYER_Z_INDEX = 0;
132997
132995
  const makeDefaultGetCellColors = (cellColors, obsIndex, theme) => (object2, { index: index2 }) => {
132998
132996
  const [r2, g2, b, a2] = cellColors && obsIndex && cellColors.get(obsIndex[index2]) || getDefaultColor(theme);
132999
132997
  return [r2, g2, b, 255 * (a2 || 1)];
@@ -133011,7 +133009,7 @@ const makeFlippedGetObsCoords = (obsEmbedding) => (i2) => [
133011
133009
  const getPosition = (object2, { index: index2, data, target }) => {
133012
133010
  target[0] = data.src.obsEmbedding.data[0][index2];
133013
133011
  target[1] = -data.src.obsEmbedding.data[1][index2];
133014
- target[2] = 0;
133012
+ target[2] = POINT_LAYER_Z_INDEX;
133015
133013
  return target;
133016
133014
  };
133017
133015
  const contourGetWeight = (object2, { index: index2, data }) => data.src.featureValues[index2];
@@ -133021,7 +133019,6 @@ const contourGetPosition = (object2, { index: index2, data, target }) => {
133021
133019
  target[2] = 0;
133022
133020
  return target;
133023
133021
  };
133024
- const contourGetPolygonOffset = () => [0, 20];
133025
133022
  class Scatterplot extends AbstractSpatialOrScatterplot {
133026
133023
  constructor(props) {
133027
133024
  super(props);
@@ -133069,7 +133066,6 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
133069
133066
  data: deckData,
133070
133067
  getWeight: contourGetWeight,
133071
133068
  getPosition: contourGetPosition,
133072
- getPolygonOffset: contourGetPolygonOffset,
133073
133069
  contours: contourThresholds.map((threshold, i2) => ({
133074
133070
  threshold: contoursFilled ? [threshold, threshold[i2 + 1] || Infinity] : threshold,
133075
133071
  // TODO: should the opacity steps be uniform? Should align with human perception.
@@ -133080,7 +133076,10 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
133080
133076
  // a
133081
133077
  contoursFilled ? (i2 + 0.5) / contourThresholds.length * 255 : (i2 + 1) / contourThresholds.length * 255
133082
133078
  ],
133083
- strokeWidth: 2
133079
+ strokeWidth: 2,
133080
+ // We need to specify a greater z-index so that the contour layers
133081
+ // will render on top of the point layer.
133082
+ zIndex: POINT_LAYER_Z_INDEX + 1 + i2
133084
133083
  })),
133085
133084
  aggregation: "MEAN",
133086
133085
  gpuAggregation: true,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, E, S, a, b, f, e, d, c } from "./index-eee2d28f.js";
1
+ import { A, E, S, a, b, f, e, d, c } from "./index-0fd62e4a.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-eee2d28f.js";
1
+ import { B as BaseDecoder } from "./index-0fd62e4a.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-eee2d28f.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-0fd62e4a.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-eee2d28f.js";
1
+ import { B as BaseDecoder } from "./index-0fd62e4a.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-eee2d28f.js";
1
+ import { B as BaseDecoder } from "./index-0fd62e4a.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-eee2d28f.js";
1
+ import { B as BaseDecoder } from "./index-0fd62e4a.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-eee2d28f.js";
1
+ import { B as BaseDecoder } from "./index-0fd62e4a.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1 +1 @@
1
- {"version":3,"file":"Scatterplot.d.ts","sourceRoot":"","sources":["../src/Scatterplot.js"],"names":[],"mappings":";AAshBA;;;;;;GAMG;AACH,sCAKG"}
1
+ {"version":3,"file":"Scatterplot.d.ts","sourceRoot":"","sources":["../src/Scatterplot.js"],"names":[],"mappings":";AA+hBA;;;;;;GAMG;AACH,sCAKG"}
@@ -10,6 +10,15 @@ const CELLS_LAYER_ID = 'scatterplot';
10
10
  const LABEL_FONT_FAMILY = "-apple-system, 'Helvetica Neue', Arial, sans-serif";
11
11
  const NUM_FORCE_SIMULATION_TICKS = 100;
12
12
  const LABEL_UPDATE_ZOOM_DELTA = 0.25;
13
+ // The TextLayer does not support passing a z-index or a getPolygonOffset,
14
+ // so it is implicitly rendered at z-index 0.
15
+ // We want the remaining layers to render below the text layers.
16
+ // eslint-disable-next-line no-unused-vars
17
+ const TEXT_LAYER_Z_INDEX = 0;
18
+ // For some reason, setting this to -10, while it solves the issue for
19
+ // text+contour+points, it also results in the points not appearing at
20
+ // certain zoom levels.
21
+ const POINT_LAYER_Z_INDEX = 0;
13
22
  // Default getter function props.
14
23
  const makeDefaultGetCellColors = (cellColors, obsIndex, theme) => (object, { index }) => {
15
24
  const [r, g, b, a] = (cellColors && obsIndex && cellColors.get(obsIndex[index]))
@@ -29,7 +38,7 @@ const makeFlippedGetObsCoords = obsEmbedding => i => ([
29
38
  const getPosition = (object, { index, data, target }) => {
30
39
  target[0] = data.src.obsEmbedding.data[0][index];
31
40
  target[1] = -data.src.obsEmbedding.data[1][index];
32
- target[2] = 0;
41
+ target[2] = POINT_LAYER_Z_INDEX;
33
42
  return target;
34
43
  };
35
44
  const contourGetWeight = (object, { index, data }) => data.src.featureValues[index];
@@ -39,7 +48,6 @@ const contourGetPosition = (object, { index, data, target }) => {
39
48
  target[2] = 0;
40
49
  return target;
41
50
  };
42
- const contourGetPolygonOffset = () => ([0, 20]);
43
51
  /**
44
52
  * React component which renders a scatterplot from cell data.
45
53
  * @param {object} props
@@ -125,7 +133,6 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
125
133
  data: deckData,
126
134
  getWeight: contourGetWeight,
127
135
  getPosition: contourGetPosition,
128
- getPolygonOffset: contourGetPolygonOffset,
129
136
  contours: contourThresholds.map((threshold, i) => ({
130
137
  threshold: (contoursFilled ? [threshold, threshold[i + 1] || Infinity] : threshold),
131
138
  // TODO: should the opacity steps be uniform? Should align with human perception.
@@ -139,6 +146,9 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
139
146
  : ((i + 1) / (contourThresholds.length)) * 255),
140
147
  ],
141
148
  strokeWidth: 2,
149
+ // We need to specify a greater z-index so that the contour layers
150
+ // will render on top of the point layer.
151
+ zIndex: POINT_LAYER_Z_INDEX + 1 + i,
142
152
  })),
143
153
  aggregation: 'MEAN',
144
154
  gpuAggregation: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot",
3
- "version": "3.4.14",
4
- "author": "Gehlenborg Lab",
3
+ "version": "3.5.0",
4
+ "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
7
7
  "type": "git",
@@ -23,12 +23,12 @@
23
23
  "d3-quadtree": "^1.0.7",
24
24
  "lodash-es": "^4.17.21",
25
25
  "react-aria": "^3.28.0",
26
- "@vitessce/constants-internal": "3.4.14",
27
- "@vitessce/gl": "3.4.14",
28
- "@vitessce/icons": "3.4.14",
29
- "@vitessce/tooltip": "3.4.14",
30
- "@vitessce/utils": "3.4.14",
31
- "@vitessce/vit-s": "3.4.14"
26
+ "@vitessce/constants-internal": "3.5.0",
27
+ "@vitessce/gl": "3.5.0",
28
+ "@vitessce/icons": "3.5.0",
29
+ "@vitessce/tooltip": "3.5.0",
30
+ "@vitessce/utils": "3.5.0",
31
+ "@vitessce/vit-s": "3.5.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@testing-library/jest-dom": "^5.16.4",
@@ -15,6 +15,16 @@ const LABEL_FONT_FAMILY = "-apple-system, 'Helvetica Neue', Arial, sans-serif";
15
15
  const NUM_FORCE_SIMULATION_TICKS = 100;
16
16
  const LABEL_UPDATE_ZOOM_DELTA = 0.25;
17
17
 
18
+ // The TextLayer does not support passing a z-index or a getPolygonOffset,
19
+ // so it is implicitly rendered at z-index 0.
20
+ // We want the remaining layers to render below the text layers.
21
+ // eslint-disable-next-line no-unused-vars
22
+ const TEXT_LAYER_Z_INDEX = 0;
23
+ // For some reason, setting this to -10, while it solves the issue for
24
+ // text+contour+points, it also results in the points not appearing at
25
+ // certain zoom levels.
26
+ const POINT_LAYER_Z_INDEX = 0;
27
+
18
28
  // Default getter function props.
19
29
  const makeDefaultGetCellColors = (cellColors, obsIndex, theme) => (object, { index }) => {
20
30
  const [r, g, b, a] = (cellColors && obsIndex && cellColors.get(obsIndex[index]))
@@ -34,7 +44,7 @@ const makeFlippedGetObsCoords = obsEmbedding => i => ([
34
44
  const getPosition = (object, { index, data, target }) => {
35
45
  target[0] = data.src.obsEmbedding.data[0][index];
36
46
  target[1] = -data.src.obsEmbedding.data[1][index];
37
- target[2] = 0;
47
+ target[2] = POINT_LAYER_Z_INDEX;
38
48
  return target;
39
49
  };
40
50
 
@@ -48,9 +58,6 @@ const contourGetPosition = (object, { index, data, target }) => {
48
58
  return target;
49
59
  };
50
60
 
51
- const contourGetPolygonOffset = () => ([0, 20]);
52
-
53
-
54
61
  /**
55
62
  * React component which renders a scatterplot from cell data.
56
63
  * @param {object} props
@@ -154,7 +161,6 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
154
161
  data: deckData,
155
162
  getWeight: contourGetWeight,
156
163
  getPosition: contourGetPosition,
157
- getPolygonOffset: contourGetPolygonOffset,
158
164
  contours: contourThresholds.map((threshold, i) => ({
159
165
  threshold: (contoursFilled ? [threshold, threshold[i + 1] || Infinity] : threshold),
160
166
  // TODO: should the opacity steps be uniform? Should align with human perception.
@@ -168,6 +174,9 @@ class Scatterplot extends AbstractSpatialOrScatterplot {
168
174
  : ((i + 1) / (contourThresholds.length)) * 255),
169
175
  ],
170
176
  strokeWidth: 2,
177
+ // We need to specify a greater z-index so that the contour layers
178
+ // will render on top of the point layer.
179
+ zIndex: POINT_LAYER_Z_INDEX + 1 + i,
171
180
  })),
172
181
  aggregation: 'MEAN',
173
182
  gpuAggregation: true,