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

Function colorMapFromCubes

docs/app/js/sanddance-app.js:10427–10435  ·  view source on GitHub ↗
(cubes)

Source from the content-addressed store, hash-verified

10425 return colorMap;
10426}
10427function colorMapFromCubes(cubes) {
10428 const map = {};
10429 cubes.forEach((cube)=>{
10430 map[cube.ordinal] = {
10431 color: cube.color
10432 };
10433 });
10434 return map;
10435}
10436function populateColorContext(colorContext, presenter) {
10437 if (!colorContext.colorMap) {
10438 const cubes = presenter.getCubeData();

Callers 1

populateColorContextFunction · 0.70

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected