MCPcopy Index your code
hub / github.com/microsoft/SandDance / needsNewCharacterSet

Function needsNewCharacterSet

docs/app/js/sanddance-app.js:11058–11076  ·  view source on GitHub ↗
(oldInsight, newInsight)

Source from the content-addressed store, hash-verified

11056 }
11057}
11058function needsNewCharacterSet(oldInsight, newInsight) {
11059 if (!oldInsight) return true;
11060 if (!newInsight) return true;
11061 if (oldInsight.chart !== newInsight.chart) return true;
11062 if (oldInsight.facetStyle !== newInsight.facetStyle) return true;
11063 if (oldInsight.totalStyle !== newInsight.totalStyle) return true;
11064 if (oldInsight.hideAxes !== newInsight.hideAxes) return true;
11065 if (oldInsight.view !== newInsight.view) return true;
11066 if (differentObjectValues(oldInsight.signalValues, newInsight.signalValues)) return true;
11067 if (differentObjectValues(oldInsight.size, newInsight.size)) return true;
11068 const oldColumns = oldInsight.columns;
11069 const newColumns = newInsight.columns;
11070 if (oldColumns.facet !== newColumns.facet) return true;
11071 if (oldColumns.facetV !== newColumns.facetV) return true;
11072 if (oldColumns.x !== newColumns.x) return true;
11073 if (oldColumns.y !== newColumns.y) return true;
11074 if (oldColumns.z !== newColumns.z) return true;
11075 return false;
11076}
11077function differentObjectValues(a, b) {
11078 if (!a && !b) return false;
11079 if (!a || !b) return true;

Callers 1

resetCharacterSetMethod · 0.70

Calls 1

differentObjectValuesFunction · 0.70

Tested by

no test coverage detected