Skip to content

Commit

Permalink
Code comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nilscb committed Sep 20, 2023
1 parent 1363a5e commit ab5820b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import PropTypes from "prop-types";
import type { colorTablesArray } from "@emerson-eps/color-tables/";
import type { Unit } from "convert-units";
import convert from "convert-units";
import type { PickingInfo } from "@deck.gl/core/typed";

export type {
BoundsAccessor,
Expand Down Expand Up @@ -99,7 +100,7 @@ export interface SubsurfaceViewerProps {
*/
isLoadedCallback?: (arg: boolean) => void;

onDragStart?: (info: unknown, event: unknown) => void;
onDragStart?: (info: PickingInfo, event: unknown) => void;
onDragEnd?: (info: unknown, event: unknown) => void;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,7 @@ export function coarsenWells(data_in: FeatureCollection): FeatureCollection {
return index === 0 || index === array.length - 1 || index % 10 == 0;
};

(
(data.features[well_no].geometry as GeometryCollection)
.geometries[1] as LineString
).coordinates = coords.filter(filterFunc);
lineString.coordinates = coords.filter(filterFunc);

if (data.features[well_no].properties) {
data.features[well_no].properties!["md"] = mds.filter(filterFunc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {
colorTables,
} from "@emerson-eps/color-tables";
import type { MapMouseEvent } from "../../components/Map";
import WellsLayer from "./wellsLayer";
import AxesLayer from "../axes/axesLayer";

const PREFIX = "VolveWells";

const classes = {
Expand Down Expand Up @@ -446,19 +449,17 @@ export const Wells3DGullfaks: ComponentStory<typeof SubsurfaceViewer> = (
onDragStart: () => setOptimizedInteraction(true),
onDragEnd: () => setOptimizedInteraction(false),
layers: [
{
"@@type": "WellsLayer",
data: "@@#resources.wellsData",
new WellsLayer({
data: "./gullfaks.json",
wellHeadStyle: { size: 4 },
refine: true,
outline: true,
optimizedInteraction, // If true will cause wellslayer to draw simplified.
},
{
"@@type": "AxesLayer",
}),
new AxesLayer({
id: "axes-layer",
bounds: [450000, 6781000, 0, 464000, 6791000, 3500],
},
}),
],
};

Expand All @@ -467,9 +468,6 @@ export const Wells3DGullfaks: ComponentStory<typeof SubsurfaceViewer> = (

Wells3DGullfaks.args = {
id: "gullfaks",
resources: {
wellsData: "./gullfaks.json",
},
bounds: [450000, 6781000, 464000, 6791000] as [
number,
number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export interface WellsLayerProps extends ExtendedLayerProps {
*/
ZIncreasingDownwards: boolean;
/** If true means that a simplified representation of the wells will be drawn.
* Useful for example during panning and roation to gain speed.
* Useful for example during panning and rotation to gain speed.
*/
optimizedInteraction: boolean;
}
Expand Down Expand Up @@ -492,7 +492,7 @@ export default class WellsLayer extends CompositeLayer<WellsLayerProps> {
);

// Highlight the multi selected wells.
const highlightMultiWells_layer = new UnfoldedGeoJsonLayer(
const highlightMultiWellsLayer = new UnfoldedGeoJsonLayer(
this.getSubLayerProps({
id: "highlight2",
data: getWellObjectsByName(
Expand Down Expand Up @@ -656,7 +656,7 @@ export default class WellsLayer extends CompositeLayer<WellsLayerProps> {
logLayer,
colorsLayer,
highlightLayer,
highlightMultiWells_layer,
highlightMultiWellsLayer,
selectionLayer,
namesLayer,
];
Expand Down

0 comments on commit ab5820b

Please sign in to comment.