Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
underbluewaters committed Oct 18, 2023
1 parent 26603f8 commit 6a2fa0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions packages/client/src/dataLayers/legends/compileLegend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ function consolidatePanels(
isEqual(i.filters, item.filters)
)
) {
console.log("creating list");
// There are other simple symbol panels with the same filters, so
// start a new list panel
unfilteredPanels.push({
Expand All @@ -211,7 +210,6 @@ function consolidatePanels(
});
continue;
}
// console.log("unhandled", item);
unfilteredPanels.push({ panel: item.panel, filters: item.filters });
}
return unfilteredPanels.map((i) => i.panel);
Expand Down Expand Up @@ -604,7 +602,6 @@ function pluckLayersWithExpression<T extends GLLegendPanel>(
styleSpec["paint_" + layer.type][paintProp].type
);
if (exprData.facets.length) {
console.log("evaluating paintprop", paintProp, exprData);
for (const facet of exprData.facets) {
const prop = facet.expression[1][1];
representedProperties.addUsedFeatureProperty(prop);
Expand Down Expand Up @@ -871,7 +868,6 @@ export function pluckListPanels(context: { layers: SeaSketchGlLayer[] }) {
});
}
}
console.log("values used", valuesUsed);
// TODO: add related domain values so that if different
// comparison values are referenced in matching fill/line layers
// they can be represented.
Expand Down Expand Up @@ -925,7 +921,6 @@ export function pluckListPanels(context: { layers: SeaSketchGlLayer[] }) {
);
// then handle case expressions, since these can be used to achieve the same
// type of results
console.log("moving on to case expressions", results, context.layers);
const caseResults: { panel: GLLegendListPanel; filters: Expression[] }[] = [];
const representedProperties = new RepresentedProperties();
const pluckedLayers: SeaSketchGlLayer[] = [];
Expand All @@ -940,7 +935,6 @@ export function pluckListPanels(context: { layers: SeaSketchGlLayer[] }) {
});
for (const layer of layers) {
if (!pluckedLayers.includes(layer)) {
console.log(`considering layer ${layer.type}`);
representedProperties.reset();
const paint = layer.paint || ({} as any);
for (const paintProp of SIGNIFICANT_PAINT_PROPS) {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/dataLayers/legends/glLegendPanels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ describe("filter panels", () => {
});

describe("Kitchen sink examples", () => {
test.skip("Choropleth with california singled-out", () => {
test("Choropleth with california singled-out", () => {
const context: { layers: SeaSketchGlLayer[]; sourceType: "vector" } = {
sourceType: "vector",
layers: [
Expand Down Expand Up @@ -1587,7 +1587,7 @@ describe("Kitchen sink examples", () => {
}
});

test.only("EEZ with complex expressions", () => {
test("EEZ with complex expressions", () => {
const legend = compileLegendFromGLStyleLayers2(
[
{
Expand Down

0 comments on commit 6a2fa0c

Please sign in to comment.