From 69a6d52240d9a3fbb2fbc01f4e46e4102c3b8035 Mon Sep 17 00:00:00 2001 From: Andrew Tolopko Date: Thu, 28 Jul 2022 15:49:33 -0400 Subject: [PATCH] fix embedding selection (#2543) reverted code to previous implementation that was presumably changed due to a "destructuring assignment" lint error; explicitly ignoring error now --- client/src/util/stateManager/viewStackHelpers.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/util/stateManager/viewStackHelpers.js b/client/src/util/stateManager/viewStackHelpers.js index 468b2cc5..c9641d9e 100644 --- a/client/src/util/stateManager/viewStackHelpers.js +++ b/client/src/util/stateManager/viewStackHelpers.js @@ -137,11 +137,13 @@ function _getEmbeddingRowOffsets(baseRowIndex, embeddingDf) { - if the embedding contains NaN coordinates, return a rowIndex that contains only the rows with discrete valued coordinates. - Currently assumes that there will be onl two dimensions in the embedding. + Currently assumes that there will be only two dimensions in the embedding. */ - const { icol } = embeddingDf; - const X = icol(0).asArray(); - const Y = icol(1).asArray(); + // eslint-disable-next-line react/destructuring-assignment -- destructuring fails + const X = embeddingDf.icol(0).asArray(); + // eslint-disable-next-line react/destructuring-assignment -- destructuring fails + const Y = embeddingDf.icol(1).asArray(); + const offsets = new Int32Array(X.length); let numOffsets = 0;