@webviz/subsurface-viewer
Version:
3D visualization component for subsurface reservoir data
37 lines (36 loc) • 1.39 kB
TypeScript
import type { Color, LayersList, PickingInfo } from "@deck.gl/core";
import { CompositeLayer } from "@deck.gl/core";
import type { Feature } from "geojson";
import type { ExtendedLayerProps } from "../utils/layerTools";
export interface BoxSelectionLayerProps extends ExtendedLayerProps {
mode: string;
selectedFeatureIndexes: number[];
pickingInfos: PickingInfo[];
refine: boolean;
pointRadiusScale: number;
lineWidthScale: number;
lineStyle: LineStyleAccessor;
wellHeadStyle: WellHeadStyleAccessor;
handleSelection: (pickingInfos: PickingInfo[]) => void;
layerIds: string[];
}
type StyleAccessorFunction = (object: Feature, objectInfo?: Record<string, unknown>) => StyleData;
type NumberPair = [number, number];
type DashAccessor = boolean | NumberPair | StyleAccessorFunction | undefined;
type ColorAccessor = Color | StyleAccessorFunction | undefined;
type SizeAccessor = number | StyleAccessorFunction | undefined;
type StyleData = NumberPair | Color | number;
type LineStyleAccessor = {
color?: ColorAccessor;
dash?: DashAccessor;
width?: SizeAccessor;
};
type WellHeadStyleAccessor = {
color?: ColorAccessor;
size?: SizeAccessor;
};
export default class BoxSelectionLayer extends CompositeLayer<BoxSelectionLayerProps> {
setMultiSelection(pickingInfos: PickingInfo[]): void;
renderLayers(): LayersList;
}
export {};