-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: convert dataset to table class #1239
Changes from all commits
56384c1
f43abd1
f36b1f8
b653beb
49f75c8
5935578
c170629
8e93715
6db5576
81b1ac3
f2586c0
87c59ba
7993342
d20eff8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
import {RGBColor, RGBAColor} from '../reducers/types'; | ||
import {Dataset, Field, Filter, Datasets} from '../reducers/vis-state-updaters'; | ||
import {LayerTextLabel, ColorRange, ColorUI} from './layer-factory'; | ||
|
||
export type LayerVisConfig = { | ||
opacity: number; | ||
colorRange: ColorRange; | ||
}; | ||
import {Field, Datasets, KeplerTable} from '../reducers/vis-state-updaters'; | ||
import {LayerTextLabel, ColorRange, ColorUI, LayerVisConfig} from './layer-factory'; | ||
|
||
export type LayerColumns = { | ||
[key: string]: {value: string | null; fieldIdx: number; optional?: boolean}; | ||
|
@@ -80,16 +75,16 @@ export class Layer { | |
hasAllColumns(): boolean; | ||
updateLayerConfig(p: Partial<LayerConfig>): Layer; | ||
updateLayerDomain(datasets: Datasets, filter?: Filter): Layer; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this type def deleted? base-layer still has There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure why this was deleted but i will revert it back There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably some rebase conflicts
|
||
updateLayerVisualChannel(dataset: Dataset, channel: string): Layer; | ||
updateLayerVisualChannel(dataset: KeplerTable, channel: string): Layer; | ||
shouldCalculateLayerData(props: string[]): boolean; | ||
formatLayerData(datasets: Datasets, oldLayerData?: any); | ||
updateLayerColorUI(prop: string, newConfig: Partial<ColorUI>): Layer; | ||
validateVisualChannel(channel: string): void; | ||
isValidToSave(): boolean; | ||
getVisualChannelDescription(key: string): VisualChannelDescription; | ||
isLayerHovered(objectInfo: any): boolean; | ||
hasHoveredObject(objectInfo: any): any | null; | ||
getHoverData(object: any, allData?: Dataset['allData'], fields?: Dataset['fields']): any; | ||
validateVisualChannel(channel: string); | ||
getVisualChannelDescription(key: string): {label: string, measure: string}; | ||
|
||
static findDefaultLayerProps(dataset: KeplerTable, foundLayers?: any[]); | ||
// static findDefaultColumnField(defaultFields, allFields) | ||
} | ||
|
||
export type LayerClassesType = { | ||
|
@@ -108,3 +103,5 @@ export type LayerClassesType = { | |
s2: Layer; | ||
}; | ||
export const LayerClasses: LayerClassesType; | ||
|
||
export type OVERLAY_TYPE = {[key: string]: string} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interchangeable table/dataset variables are quite confusing. Do we plan to unify this in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea i agree, let's just keep calling it
dataset
in kepler.gl, because it is used everywhere