Skip to content

Commit

Permalink
[Chore] fix types and missing import (#1891)
Browse files Browse the repository at this point in the history
* upstream
* ts fix
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Co-authored-by: Shan He <heshan0131@gmail.com>
  • Loading branch information
igorDykhta committed Aug 4, 2022
1 parent 28cbb75 commit d90cd18
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/layers/src/icon-layer/icon-layer.ts
Expand Up @@ -20,6 +20,7 @@

import window from 'global/window';
import {BrushingExtension} from '@deck.gl/extensions';
import GL from '@luma.gl/constants';

import {SvgIconLayer} from '@kepler.gl/deckgl-layers';
import IconLayerIcon from './icon-layer-icon';
Expand Down Expand Up @@ -354,7 +355,8 @@ export default class IconLayer extends Layer {

const parameters = {
// icons will be flat on the map when the altitude column is not used
depthTest: this.config.columns.altitude?.fieldIdx > -1
depthTest: this.config.columns.altitude?.fieldIdx > -1,
cullFace: GL.FRONT
};

return !this.iconGeometry
Expand Down
1 change: 1 addition & 0 deletions src/reducers/index.ts
Expand Up @@ -61,6 +61,7 @@ export type {
AnimationConfig,
Brush,
Coordinate,
KeplerTable,
Datasets,
Editor,
Feature,
Expand Down
1 change: 1 addition & 0 deletions src/reducers/vis-state-updaters.ts
Expand Up @@ -103,6 +103,7 @@ import * as MapStateActions from 'actions/map-state-actions';
import {LoaderObject} from '@loaders.gl/loader-utils';
import {KeplerTable} from '../utils';

export {KeplerTable};
export type HistogramBin = {
x0: number | undefined;
x1: number | undefined;
Expand Down
3 changes: 2 additions & 1 deletion src/schemas/dataset-schema.ts
Expand Up @@ -22,6 +22,7 @@ import pick from 'lodash.pick';
import {console as globalConsole} from 'global/window';

import {ProtoDataset} from 'actions';
import {KeplerTable} from 'reducers';
import {RGBColor} from 'types';
import {VERSIONS} from './versions';
import Schema from './schema';
Expand Down Expand Up @@ -113,7 +114,7 @@ export const propertiesV1 = {
export class DatasetSchema extends Schema {
key = 'dataset';

save(dataset): SavedDatasetV1['data'] {
save(dataset: KeplerTable): SavedDatasetV1['data'] {
const datasetFlattened = dataset.dataContainer
? {
...dataset,
Expand Down
3 changes: 2 additions & 1 deletion src/schemas/schema-manager.ts
Expand Up @@ -20,6 +20,7 @@

import {console as Console} from 'global/window';

import {Datasets} from 'reducers';
import datasetSchema from './dataset-schema';
import mapStyleSchema from './map-style-schema';
import mapStateSchema from './map-state-schema';
Expand Down Expand Up @@ -210,7 +211,7 @@ export class KeplerGLSchema {

const {visState} = state;

const datasets = Object.values(visState.datasets).map(ds => ({
const datasets = Object.values(visState.datasets as Datasets).map(ds => ({
version: this._version,
data: this._datasetSchema[this._version].save(ds)
}));
Expand Down
10 changes: 10 additions & 0 deletions src/utils/index.ts
Expand Up @@ -44,6 +44,13 @@ export {resetFilterGpuMode, assignGpuChannels} from 'utils/gpu-filter-utils';

// REDUCER UTILS
export {updateAllLayerDomainData} from '../reducers/vis-state-updaters';
export {
validateLayerWithData,
validateLayersByDatasets,
validateSavedVisualChannels,
mergeLayers
} from '../reducers/vis-state-merger';

export {getHexFields, containValidTime} from '@kepler.gl/layers';

export {
Expand All @@ -53,6 +60,9 @@ export {
} from './table-utils/kepler-table';
export {createDataContainer, createIndexedDataContainer} from './table-utils/data-container-utils';

// Render
export {renderedSize} from 'components/common/data-table/cell-size';

export * from './color-utils';
export * from './data-scale-utils';
export * from './data-utils';
Expand Down

0 comments on commit d90cd18

Please sign in to comment.