Skip to content

Commit

Permalink
[Chore]: Technical: Translate base-layer (#1746)
Browse files Browse the repository at this point in the history
* Moved Layer class from d.ts file to base-layer

Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>

* Applied suggested changes

Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>

* Added new typings

Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>

* Applied suggested changes

Signed-off-by: Maksim Suslov <maksim.suslov@actionengine.com>
  • Loading branch information
HeimEndyd committed Mar 21, 2022
1 parent 4a687ed commit dd14702
Show file tree
Hide file tree
Showing 5 changed files with 240 additions and 225 deletions.
10 changes: 5 additions & 5 deletions src/actions/vis-state-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
import ActionTypes from 'constants/action-types';
import {AddDataToMapPayload} from '../actions/actions';
import {FileCacheItem} from '../processors/file-handler';
import {Layer, LayerConfig, LayerVisConfig} from 'layers';
import {Layer, LayerBaseConfig, LayerVisConfig} from 'layers';
import {Feature, InteractionConfig} from 'reducers/vis-state-updaters';
import {ValueOf, Merge, RGBColor} from '../reducers/types';
// TODO - import LoaderObject type from @loaders.gl/core when supported
// TODO - import LoadOptions type from @loaders.gl/core when supported

export type LayerConfigChangeUpdaterAction = {
oldLayer: Layer;
newConfig: Partial<LayerConfig>;
newConfig: Partial<LayerBaseConfig>;
};
/**
* Update layer base config: dataId, label, column, isVisible
Expand All @@ -41,7 +41,7 @@ export type LayerConfigChangeUpdaterAction = {
*/
export function layerConfigChange(
oldLayer: Layer,
newConfig: Partial<LayerConfig>
newConfig: Partial<LayerBaseConfig>
): Merge<LayerConfigChangeUpdaterAction, {type: typeof ActionTypes.LAYER_CONFIG_CHANGE}> {
return {
type: ActionTypes.LAYER_CONFIG_CHANGE,
Expand Down Expand Up @@ -102,7 +102,7 @@ export function layerTypeChange(
}
export type LayerVisualChannelConfigChangeUpdaterAction = {
oldLayer: Layer;
newConfig: Partial<LayerConfig>;
newConfig: Partial<LayerBaseConfig>;
channel: string;
};
/**
Expand All @@ -116,7 +116,7 @@ export type LayerVisualChannelConfigChangeUpdaterAction = {
*/
export function layerVisualChannelConfigChange(
oldLayer: Layer,
newConfig: Partial<LayerConfig>,
newConfig: Partial<LayerBaseConfig>,
channel: string
): Merge<
LayerVisualChannelConfigChangeUpdaterAction,
Expand Down

0 comments on commit dd14702

Please sign in to comment.