MCPcopy
hub / github.com/microsoft/SandDance / getCharacterSet

Method getCharacterSet

packages/sanddance/src/characterSet.ts:15–32  ·  view source on GitHub ↗
(stage: types.Stage)

Source from the content-addressed store, hash-verified

13 }
14
15 public getCharacterSet(stage: types.Stage) {
16 if (!this.chars) {
17 const map: { [char: string]: true } = {};
18 const addText = (text: string) => {
19 Array.from(text).forEach(char => { map[char] = true; });
20 };
21 stage.textData.forEach(t => addText(t.text));
22 const { x, y, z } = stage.axes;
23 [x, y, z].forEach(axes => {
24 axes.forEach(axis => {
25 if (axis.tickText) axis.tickText.forEach(t => addText(t.text));
26 if (axis.title) addText(axis.title.text);
27 });
28 });
29 this.chars = Object.keys(map);
30 }
31 return this.chars;
32 }
33}
34
35function needsNewCharacterSet(oldInsight: Insight, newInsight: Insight) {

Callers 2

getLayersFunction · 0.45
createConfigMethod · 0.45

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected