Skip to content

Commit

Permalink
feat: fix in legend
Browse files Browse the repository at this point in the history
  • Loading branch information
taeyma41 committed Apr 21, 2023
1 parent b2bd91b commit ca455bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@imec-int/kepler.gl",
"author": "imec <admin@imec-apt.be>",
"version": "2.5.5-14",
"version": "2.5.5-15",
"description": "kepler.gl is a webgl based application to visualize large scale location data in the browser",
"license": "MIT",
"main": "dist/index.js",
Expand Down
5 changes: 2 additions & 3 deletions src/components/common/color-legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ const getQuantLegends = (scale, labelFormat) => {

const labels = scale.range().map(d => {
const invert = scale.invertExtent(d);
return `${labelFormat(invert[0] ? invert[0] : 0)} to ${
invert[1] ? labelFormat(invert[1]) : Infinity
}`;
if (invert[0] === undefined) return '';
return `${labelFormat(invert[0])} to ${invert[1] ? labelFormat(invert[1]) : Infinity}`;
});

return {
Expand Down
6 changes: 5 additions & 1 deletion src/layers/float-bitmap-layer/float-bitmap-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export default class FloatBitmapLayer extends Layer {
if (this.config.dataId === null) {
return {};
}
const {dataContainer} = datasets[this.config.dataId];
const layerDataset = datasets[this.config.dataId];
const {dataContainer} = layerDataset;
// extract URL from row 0 column 0
const width = dataContainer.valueAt(0, 0);
const height = dataContainer.valueAt(0, 1);
Expand All @@ -74,8 +75,11 @@ export default class FloatBitmapLayer extends Layer {
const topLeft = wktParser(rawTopLeft);
const bottomRight = wktParser(rawBottomRight);

const getPosition = this.getPositionAccessor(dataContainer);

// const oldUrl = oldLayerData ? oldLayerData.url : undefined;
const accessors = this.getAttributeAccessors({
getPosition,
dataContainer
});
return {
Expand Down

0 comments on commit ca455bc

Please sign in to comment.