performance - parse color descriptions once

This commit is contained in:
bkmartinjr
2018-04-30 20:20:50 -07:00
parent c98dd20cb3
commit 118248446e
5 changed files with 41 additions and 49 deletions
+4
View File
@@ -1,4 +1,7 @@
import _ from "lodash";
import {
parseRGB
} from "../util/parseRGB";
const Controls = (state = {
_ranges: null, /* this comes from initialize, this is universe */
@@ -34,6 +37,7 @@ const Controls = (state = {
_.each(currentCellSelection, (cell) => {
cell["__selected__"] = true;
cell["__color__"] = "rgba(0,0,0,1)" /* initial color for all cells in all charts */
cell["__colorRGB__"] = parseRGB(cell["__color__"]);
});
/*
construct a copy of the ranges object that only has categorical