rename to createVarDimension

This commit is contained in:
Colin Megill
2018-10-15 11:20:52 -07:00
parent 5165297e2a
commit 0c8f4ed824
2 changed files with 4 additions and 7 deletions
+3 -3
View File
@@ -290,7 +290,7 @@ function deduceDimensionType(attributes, fieldName) {
(it will not be garbage collected without this call)
*/
export function createVarDimensionsMap(
export function createVarDimension(
world,
_worldVarDataCache,
crossfilter,
@@ -298,10 +298,10 @@ export function createVarDimensionsMap(
) {
const { varDataCache, worldObsIndex } = world;
const varData = _worldVarDataCache[geneName];
const worldIndex = worldObsIndex ? idx => worldObsIndex[idx] : idx => idx; /* this results in NaN when implemented below as it was in the test code */
const worldIndex = worldObsIndex ? idx => worldObsIndex[idx] : idx => idx;
return crossfilter.dimension(r => {
return varData[r.__obsIndex__];
return varData[worldIndex(r.__obsIndex__)];
}, Float32Array);
}