MCPcopy Create free account
hub / github.com/alephdata/aleph / assignColor

Method assignColor

ui/src/components/MappingEditor/MappingList.js:43–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41 }
42
43 assignColor() {
44 const colorIndex = this.getValues()
45 .map((mapping) => colorOptions.indexOf(mapping.color))
46 .sort()
47 .reduce((acc, currentValue) => (acc === currentValue ? acc + 1 : acc), 0);
48
49 return colorOptions[colorIndex % colorOptions.length];
50 }
51
52 assignId(schema) {
53 const schemaCount = this.getSchemaCount(schema);

Callers 2

constructorMethod · 0.95
addMappingMethod · 0.95

Calls 1

getValuesMethod · 0.95

Tested by

no test coverage detected