@webviz/subsurface-viewer 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Map.d.ts +26 -21
- package/dist/components/Map.js +563 -455
- package/dist/components/Map.js.map +1 -1
- package/dist/layers/utils/layerTools.d.ts +1 -1
- package/dist/layers/utils/layerTools.js +4 -2
- package/dist/layers/utils/layerTools.js.map +1 -1
- package/dist/utils/BoundingBox3D.d.ts +18 -0
- package/dist/utils/BoundingBox3D.js +41 -0
- package/dist/utils/BoundingBox3D.js.map +1 -0
- package/dist/utils/BoundingBox3D.test.d.ts +1 -0
- package/dist/utils/BoundingBox3D.test.js +33 -0
- package/dist/utils/BoundingBox3D.test.js.map +1 -0
- package/package.json +2 -1
package/dist/components/Map.d.ts
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import type { Color, LayersList, LayerProps, LayerContext, View, PickingInfo } from "@deck.gl/core/typed";
|
|
2
1
|
import React from "react";
|
|
2
|
+
import type { MjolnirGestureEvent } from "mjolnir.js";
|
|
3
|
+
import type { Color, LayersList, LayerProps, LayerContext, View, PickingInfo } from "@deck.gl/core/typed";
|
|
3
4
|
import type { colorTablesArray } from "@emerson-eps/color-tables/";
|
|
5
|
+
import type { BoundingBox3D } from "../utils/BoundingBox3D";
|
|
4
6
|
import type { Unit } from "convert-units";
|
|
5
7
|
import type { LightsType } from "../SubsurfaceViewer";
|
|
6
|
-
import type { MjolnirGestureEvent } from "mjolnir.js";
|
|
7
8
|
/**
|
|
8
9
|
* 3D bounding box defined as [xmin, ymin, zmin, xmax, ymax, zmax].
|
|
9
10
|
*/
|
|
10
|
-
export type BoundingBox3D
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export type { BoundingBox3D };
|
|
12
|
+
/**
|
|
13
|
+
* 2D bounding box defined as [left, bottom, right, top]
|
|
14
|
+
*/
|
|
15
|
+
export type BoundingBox2D = [number, number, number, number];
|
|
14
16
|
/**
|
|
15
17
|
* Type of the function returning coordinate boundary for the view defined as [left, bottom, right, top].
|
|
16
18
|
*/
|
|
17
|
-
export type BoundsAccessor = () =>
|
|
19
|
+
export type BoundsAccessor = () => BoundingBox2D;
|
|
20
|
+
export type ReportBoundingBoxAction = {
|
|
21
|
+
layerBoundingBox: BoundingBox3D;
|
|
22
|
+
};
|
|
18
23
|
export type TooltipCallback = (info: PickingInfo) => string | Record<string, unknown> | null;
|
|
19
24
|
/**
|
|
20
25
|
* Views
|
|
@@ -69,7 +74,7 @@ export interface ViewportType {
|
|
|
69
74
|
*/
|
|
70
75
|
export interface ViewStateType {
|
|
71
76
|
target: number[];
|
|
72
|
-
zoom: number | BoundingBox3D;
|
|
77
|
+
zoom: number | BoundingBox3D | undefined;
|
|
73
78
|
rotationX: number;
|
|
74
79
|
rotationOrbit: number;
|
|
75
80
|
minZoom?: number;
|
|
@@ -82,7 +87,18 @@ export interface DeckGLLayerContext extends LayerContext {
|
|
|
82
87
|
colorTables: colorTablesArray;
|
|
83
88
|
};
|
|
84
89
|
}
|
|
90
|
+
export interface MapMouseEvent {
|
|
91
|
+
type: "click" | "hover" | "contextmenu";
|
|
92
|
+
infos: PickingInfo[];
|
|
93
|
+
x?: number;
|
|
94
|
+
y?: number;
|
|
95
|
+
wellname?: string;
|
|
96
|
+
wellcolor?: Color;
|
|
97
|
+
md?: number;
|
|
98
|
+
tvd?: number;
|
|
99
|
+
}
|
|
85
100
|
export type EventCallback = (event: MapMouseEvent) => void;
|
|
101
|
+
export declare function useHoverInfo(): [PickingInfo[], EventCallback];
|
|
86
102
|
export interface MapProps {
|
|
87
103
|
/**
|
|
88
104
|
* The ID of this component, used to identify dash components
|
|
@@ -103,9 +119,9 @@ export interface MapProps {
|
|
|
103
119
|
* Coordinate boundary for the view defined as [left, bottom, right, top].
|
|
104
120
|
* Should be used for 2D view only.
|
|
105
121
|
*/
|
|
106
|
-
bounds?:
|
|
122
|
+
bounds?: BoundingBox2D | BoundsAccessor;
|
|
107
123
|
/**
|
|
108
|
-
* Camera state for the view defined as
|
|
124
|
+
* Camera state for the view defined as a ViewStateType.
|
|
109
125
|
* Should be used for 3D view only.
|
|
110
126
|
* If the zoom is given as a 3D bounding box, the camera state is computed to
|
|
111
127
|
* display the full box.
|
|
@@ -180,17 +196,6 @@ export interface MapProps {
|
|
|
180
196
|
children?: React.ReactNode;
|
|
181
197
|
getTooltip?: TooltipCallback;
|
|
182
198
|
}
|
|
183
|
-
export interface MapMouseEvent {
|
|
184
|
-
type: "click" | "hover" | "contextmenu";
|
|
185
|
-
infos: PickingInfo[];
|
|
186
|
-
x?: number;
|
|
187
|
-
y?: number;
|
|
188
|
-
wellname?: string;
|
|
189
|
-
wellcolor?: Color;
|
|
190
|
-
md?: number;
|
|
191
|
-
tvd?: number;
|
|
192
|
-
}
|
|
193
|
-
export declare function useHoverInfo(): [PickingInfo[], EventCallback];
|
|
194
199
|
declare const Map: React.FC<MapProps>;
|
|
195
200
|
export default Map;
|
|
196
201
|
export declare function jsonToObject(data: Record<string, unknown>[] | LayerProps[], enums?: Record<string, unknown>[] | undefined): LayersList | View[];
|