MCPcopy Create free account
hub / github.com/microsoft/SandDance / applyColorMapToCubes

Function applyColorMapToCubes

docs/tests/v2/es6/js/sanddance.js:148294–148318  ·  view source on GitHub ↗
(maps, cubes, unselectedColorMethod)

Source from the content-addressed store, hash-verified

148292}
148293
148294function applyColorMapToCubes(maps, cubes, unselectedColorMethod) {
148295 Object.keys(maps[0]).forEach(ordinal => {
148296 const cube = cubes[+ordinal];
148297
148298 if (cube && !cube.isEmpty) {
148299 const actualColorMappedItem = maps[0][ordinal];
148300
148301 if (maps.length > 1) {
148302 const selectedColorMappedItem = maps[1][ordinal];
148303
148304 if (selectedColorMappedItem) {
148305 if (selectedColorMappedItem.unSelected && unselectedColorMethod) {
148306 cube.color = unselectedColorMethod(actualColorMappedItem.color);
148307 } else {
148308 cube.color = selectedColorMappedItem.color;
148309 }
148310
148311 return;
148312 }
148313 }
148314
148315 cube.color = actualColorMappedItem.color;
148316 }
148317 });
148318}
148319},{"@msrvida/vega-deck.gl":"vVi8","./specs/constants":"RaLA"}],"Ulld":[function(require,module,exports) {
148320"use strict";
148321

Callers

nothing calls this directly

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected