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

Function getSelectionColorItem

docs/app/js/sanddance-app.js:10405–10416  ·  view source on GitHub ↗
(datum)

Source from the content-addressed store, hash-verified

10403var _constants = require("./constants");
10404function getSelectedColorMap(currentData, showSelectedData, showActive, viewerOptions) {
10405 function getSelectionColorItem(datum) {
10406 let item;
10407 if (showSelectedData) item = datum[(0, _sanddanceSpecs.FieldNames).Selected] ? {
10408 color: _vegaDeckGl.util.colorFromString(viewerOptions.colors.selectedCube)
10409 } : {
10410 unSelected: true
10411 };
10412 if (showActive && datum[(0, _sanddanceSpecs.FieldNames).Active]) item = {
10413 color: _vegaDeckGl.util.colorFromString(viewerOptions.colors.activeCube)
10414 };
10415 return item;
10416 }
10417 const colorMap = {};
10418 currentData.forEach((datum)=>{
10419 const selectionColor = getSelectionColorItem(datum);

Callers 1

getSelectedColorMapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected