Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 15, 2023
1 parent 3513420 commit 1339c20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
1 change: 0 additions & 1 deletion taxonium_component/src/components/DeckSettingsModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const DeckSettingsModal = ({
style={settingsModalStyle}
onRequestClose={() => setDeckSettingsOpen(false)}
contentLabel="Deck Settings Modal"

>
<h2 className="font-medium mb-5 text-lg">Settings</h2>
<Tabs>
Expand Down
45 changes: 25 additions & 20 deletions taxonium_component/src/hooks/useLayers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -559,26 +559,31 @@ const useLayers = ({
[isCurrentlyOutsideBounds]
);

const processedLayers = layers.filter(x=> x!==null).map((layer) => {
if (layer.layerType === "ScatterplotLayer") {
return new ScatterplotLayer(layer);
}
if (layer.layerType === "LineLayer") {
return new LineLayer(layer);
}
if (layer.layerType === "PolygonLayer") {
return new PolygonLayer(layer);
}
if (layer.layerType === "TextLayer") {
return new TextLayer(layer);
}
if (layer.layerType === "SolidPolygonLayer") {
return new SolidPolygonLayer(layer);
}
console.log("could not map layer spec for ", layer);
});

const { triggerSVGdownload } = getSVGfunction(layers.filter(x=> x!==null), viewState);
const processedLayers = layers
.filter((x) => x !== null)
.map((layer) => {
if (layer.layerType === "ScatterplotLayer") {
return new ScatterplotLayer(layer);
}
if (layer.layerType === "LineLayer") {
return new LineLayer(layer);
}
if (layer.layerType === "PolygonLayer") {
return new PolygonLayer(layer);
}
if (layer.layerType === "TextLayer") {
return new TextLayer(layer);
}
if (layer.layerType === "SolidPolygonLayer") {
return new SolidPolygonLayer(layer);
}
console.log("could not map layer spec for ", layer);
});

const { triggerSVGdownload } = getSVGfunction(
layers.filter((x) => x !== null),
viewState
);

return { layers: processedLayers, layerFilter, keyStuff, triggerSVGdownload };
};
Expand Down

0 comments on commit 1339c20

Please sign in to comment.