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

Function getSelectionColorItem

docs/tests/v2/es6/js/sanddance.js:148242–148260  ·  view source on GitHub ↗
(datum)

Source from the content-addressed store, hash-verified

148240// Licensed under the MIT license.
148241function getSelectedColorMap(currentData, showSelectedData, showActive, viewerOptions) {
148242 function getSelectionColorItem(datum) {
148243 let item;
148244
148245 if (showSelectedData) {
148246 item = datum[_constants.FieldNames.Selected] ? {
148247 color: viewerOptions.colors.selectedCube
148248 } : {
148249 unSelected: true
148250 };
148251 }
148252
148253 if (showActive && datum[_constants.FieldNames.Active]) {
148254 item = {
148255 color: viewerOptions.colors.activeCube
148256 };
148257 }
148258
148259 return item;
148260 }
148261
148262 const colorMap = {};
148263 currentData.forEach(datum => {

Callers 1

getSelectedColorMapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected