@equinor/videx-map 1.14.3 → 1.14.4
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/EventHandler.d.ts +21 -21
- package/dist/ExplorationLayer.d.ts +38 -38
- package/dist/FaultlineModule.d.ts +51 -51
- package/dist/FieldModule.d.ts +113 -113
- package/dist/GeoJSONModule/GeoJSONModule.d.ts +47 -47
- package/dist/GeoJSONModule/constants.d.ts +13 -13
- package/dist/GeoJSONModule/index.d.ts +6 -6
- package/dist/GeoJSONModule/interfaces.d.ts +15 -15
- package/dist/GeoJSONModule/labels.d.ts +46 -46
- package/dist/GeoJSONModule/linestring.d.ts +55 -55
- package/dist/GeoJSONModule/multipolygon.d.ts +94 -94
- package/dist/GeoJSONModule/point.d.ts +26 -26
- package/dist/GeoJSONModule/polygon.d.ts +96 -96
- package/dist/GeoJSONModule/shader.d.ts +10 -10
- package/dist/ModuleInterface.d.ts +26 -26
- package/dist/OutlineModule.d.ts +81 -81
- package/dist/ResizeConfigInterface.d.ts +14 -14
- package/dist/WellboreModule.d.ts +126 -126
- package/dist/index.d.ts +8 -8
- package/dist/pixiOverlayInterfaces.d.ts +16 -16
- package/dist/utils/ComparableArray.d.ts +60 -60
- package/dist/utils/LineDictionary.d.ts +89 -89
- package/dist/utils/LineInterpolator.d.ts +84 -84
- package/dist/utils/Log.d.ts +1 -1
- package/dist/utils/Mesh.d.ts +46 -46
- package/dist/utils/PointDictionary.d.ts +58 -58
- package/dist/utils/Radius.d.ts +2 -2
- package/dist/utils/Rect.d.ts +27 -27
- package/dist/utils/TriangleDictionary.d.ts +21 -21
- package/dist/utils/WellboreMesh.d.ts +51 -51
- package/dist/utils/centerOfMass.d.ts +8 -8
- package/dist/utils/fields/Highlighter.d.ts +33 -33
- package/dist/utils/fields/LabelManager.d.ts +62 -62
- package/dist/utils/fields/groupLabels.d.ts +5 -5
- package/dist/utils/fields/preprocessFields.d.ts +29 -29
- package/dist/utils/generateCircle.d.ts +10 -10
- package/dist/utils/linePoint.d.ts +27 -27
- package/dist/utils/lineReducer.d.ts +9 -9
- package/dist/utils/wellbores/AsyncLoop.d.ts +35 -35
- package/dist/utils/wellbores/Colors.d.ts +40 -40
- package/dist/utils/wellbores/Config.d.ts +80 -80
- package/dist/utils/wellbores/DataManager.d.ts +15 -15
- package/dist/utils/wellbores/Highlight.d.ts +18 -18
- package/dist/utils/wellbores/LabelType.d.ts +9 -9
- package/dist/utils/wellbores/Projector.d.ts +20 -20
- package/dist/utils/wellbores/RealtimeWellbore.d.ts +21 -21
- package/dist/utils/wellbores/Shader.d.ts +41 -41
- package/dist/utils/wellbores/data/Group.d.ts +48 -48
- package/dist/utils/wellbores/data/RootData.d.ts +29 -29
- package/dist/utils/wellbores/data/SourceData.d.ts +25 -25
- package/dist/utils/wellbores/data/WellboreData.d.ts +76 -76
- package/dist/utils/wellbores/data/WellboreEventData.d.ts +16 -16
- package/dist/utils/wellbores/data/details/Detail.d.ts +20 -20
- package/dist/utils/wellbores/data/details/DetailOptions.d.ts +7 -7
- package/dist/utils/wellbores/data/details/ShoeDetail.d.ts +14 -14
- package/dist/utils/wellbores/data/details/index.d.ts +11 -11
- package/dist/utils/wellbores/data/index.d.ts +6 -6
- package/dist/utils/wellbores/highlight-helper.d.ts +6 -6
- package/dist/utils/wellbores/intervals.d.ts +15 -15
- package/dist/utils/wellbores/labels/Label.d.ts +39 -39
- package/dist/utils/wellbores/labels/index.d.ts +2 -2
- package/dist/utils/wellbores/labels/label-helper.d.ts +3 -3
- package/dist/utils/wellbores/registries/CallbackRegistry.d.ts +23 -23
- package/dist/utils/wellbores/registries/ColorRegistry.d.ts +22 -22
- package/dist/utils/wellbores/registries/index.d.ts +2 -2
- package/package.json +12 -9
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { pixiOverlayBase } from './pixiOverlayInterfaces';
|
|
2
|
-
import * as PIXI from 'pixi.js';
|
|
3
|
-
/** Class with common functions shared by all layers. */
|
|
4
|
-
export declare abstract class ModuleInterface {
|
|
5
|
-
/** Function for pixi overlay. */
|
|
6
|
-
pixiOverlay: pixiOverlayBase;
|
|
7
|
-
/** Root container for layer. */
|
|
8
|
-
root: PIXI.Container;
|
|
9
|
-
/** True if layer is currently visible. */
|
|
10
|
-
visibility: boolean;
|
|
11
|
-
/** Common constructor for all map layers. */
|
|
12
|
-
constructor();
|
|
13
|
-
destroy(): void;
|
|
14
|
-
/** Toggle the visibility of the root PIXI container. */
|
|
15
|
-
toggle(): void;
|
|
16
|
-
/**
|
|
17
|
-
* Set visibility of the root PIXI container to a given value.
|
|
18
|
-
*
|
|
19
|
-
* @param visible Should layer be visible?
|
|
20
|
-
* @returns True if new visibility was set
|
|
21
|
-
*/
|
|
22
|
-
setVisibility(visible: boolean): boolean;
|
|
23
|
-
onAdd(_map: L.Map): void;
|
|
24
|
-
onRemove(_map: L.Map): void;
|
|
25
|
-
resize(_zoom: number): void;
|
|
26
|
-
}
|
|
1
|
+
import { pixiOverlayBase } from './pixiOverlayInterfaces';
|
|
2
|
+
import * as PIXI from 'pixi.js';
|
|
3
|
+
/** Class with common functions shared by all layers. */
|
|
4
|
+
export declare abstract class ModuleInterface {
|
|
5
|
+
/** Function for pixi overlay. */
|
|
6
|
+
pixiOverlay: pixiOverlayBase;
|
|
7
|
+
/** Root container for layer. */
|
|
8
|
+
root: PIXI.Container;
|
|
9
|
+
/** True if layer is currently visible. */
|
|
10
|
+
visibility: boolean;
|
|
11
|
+
/** Common constructor for all map layers. */
|
|
12
|
+
constructor();
|
|
13
|
+
destroy(): void;
|
|
14
|
+
/** Toggle the visibility of the root PIXI container. */
|
|
15
|
+
toggle(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Set visibility of the root PIXI container to a given value.
|
|
18
|
+
*
|
|
19
|
+
* @param visible Should layer be visible?
|
|
20
|
+
* @returns True if new visibility was set
|
|
21
|
+
*/
|
|
22
|
+
setVisibility(visible: boolean): boolean;
|
|
23
|
+
onAdd(_map: L.Map): void;
|
|
24
|
+
onRemove(_map: L.Map): void;
|
|
25
|
+
resize(_zoom: number): void;
|
|
26
|
+
}
|
package/dist/OutlineModule.d.ts
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import * as PIXI from 'pixi.js';
|
|
2
|
-
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
-
export interface OutlineData {
|
|
4
|
-
coordinates: [number, number][][];
|
|
5
|
-
meta: {
|
|
6
|
-
defaultOn: boolean;
|
|
7
|
-
fill: string;
|
|
8
|
-
name: string;
|
|
9
|
-
stroke: [number, number, number];
|
|
10
|
-
type: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
interface Uniforms {
|
|
14
|
-
color: [number, number, number];
|
|
15
|
-
/** Additional width of outline */
|
|
16
|
-
width: number;
|
|
17
|
-
visible: boolean;
|
|
18
|
-
}
|
|
19
|
-
/** Interface for outline config. */
|
|
20
|
-
interface InputConfig {
|
|
21
|
-
/** Base with without any scaling. (Default: 0.1) */
|
|
22
|
-
baseWidth?: number;
|
|
23
|
-
minZoom?: number;
|
|
24
|
-
maxZoom?: number;
|
|
25
|
-
/** Extra width of line at max zoom. (Default: 0.1) */
|
|
26
|
-
minExtraWidth?: number;
|
|
27
|
-
/** Extra width of line at min zoom. (Default: 10.0) */
|
|
28
|
-
maxExtraWidth?: number;
|
|
29
|
-
}
|
|
30
|
-
/** Interface for outline config. */
|
|
31
|
-
interface Config {
|
|
32
|
-
/** Base with without any scaling. (Default: 0.1) */
|
|
33
|
-
baseWidth: number;
|
|
34
|
-
/** Reference value for min zoom. (Default: 0) */
|
|
35
|
-
minZoom: number;
|
|
36
|
-
/** Reference value for max zoom. (Default: 18) */
|
|
37
|
-
maxZoom: number;
|
|
38
|
-
/** Extra width of line at max zoom. (Default: 0.0) */
|
|
39
|
-
minExtraWidth: number;
|
|
40
|
-
/** Extra width of line at min zoom. (Default: 0.3) */
|
|
41
|
-
maxExtraWidth: number;
|
|
42
|
-
}
|
|
43
|
-
/** Current width of outline. */
|
|
44
|
-
interface State {
|
|
45
|
-
extraWidth: number;
|
|
46
|
-
}
|
|
47
|
-
/** Module for displaying outlines. */
|
|
48
|
-
export default class OutlineModule extends ModuleInterface {
|
|
49
|
-
/** Mapping outline collection name with corresponding uniforms. */
|
|
50
|
-
outlineDict: {
|
|
51
|
-
[key: string]: Uniforms;
|
|
52
|
-
};
|
|
53
|
-
/** Graphic elements currently existing in world space. */
|
|
54
|
-
spawned: PIXI.Mesh[];
|
|
55
|
-
/** Vertex shader for the outlines. */
|
|
56
|
-
static vertexShader: string;
|
|
57
|
-
/** Fragment shader for the outlines. */
|
|
58
|
-
static fragmentShader: string;
|
|
59
|
-
/** Default config. */
|
|
60
|
-
config: Config;
|
|
61
|
-
state: State;
|
|
62
|
-
scaling: (zoom: number) => number;
|
|
63
|
-
constructor(config?: InputConfig);
|
|
64
|
-
/**
|
|
65
|
-
* Set collection of outlines to display. Clears previous content on execution.
|
|
66
|
-
* @param data Outlines to draw
|
|
67
|
-
*/
|
|
68
|
-
set(data: OutlineData[]): void;
|
|
69
|
-
/**
|
|
70
|
-
* Set visibility for outline layers.
|
|
71
|
-
* @param names Names of collections to modify
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* setVisibleLayers(['OWC', 'GOC']);
|
|
75
|
-
*/
|
|
76
|
-
setVisibleLayers(names: string[]): void;
|
|
77
|
-
/** Clear all spawned graphic elements and return to pool. */
|
|
78
|
-
clear(): void;
|
|
79
|
-
resize(zoom: number): void;
|
|
80
|
-
}
|
|
81
|
-
export {};
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
+
export interface OutlineData {
|
|
4
|
+
coordinates: [number, number][][];
|
|
5
|
+
meta: {
|
|
6
|
+
defaultOn: boolean;
|
|
7
|
+
fill: string;
|
|
8
|
+
name: string;
|
|
9
|
+
stroke: [number, number, number];
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface Uniforms {
|
|
14
|
+
color: [number, number, number];
|
|
15
|
+
/** Additional width of outline */
|
|
16
|
+
width: number;
|
|
17
|
+
visible: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Interface for outline config. */
|
|
20
|
+
interface InputConfig {
|
|
21
|
+
/** Base with without any scaling. (Default: 0.1) */
|
|
22
|
+
baseWidth?: number;
|
|
23
|
+
minZoom?: number;
|
|
24
|
+
maxZoom?: number;
|
|
25
|
+
/** Extra width of line at max zoom. (Default: 0.1) */
|
|
26
|
+
minExtraWidth?: number;
|
|
27
|
+
/** Extra width of line at min zoom. (Default: 10.0) */
|
|
28
|
+
maxExtraWidth?: number;
|
|
29
|
+
}
|
|
30
|
+
/** Interface for outline config. */
|
|
31
|
+
interface Config {
|
|
32
|
+
/** Base with without any scaling. (Default: 0.1) */
|
|
33
|
+
baseWidth: number;
|
|
34
|
+
/** Reference value for min zoom. (Default: 0) */
|
|
35
|
+
minZoom: number;
|
|
36
|
+
/** Reference value for max zoom. (Default: 18) */
|
|
37
|
+
maxZoom: number;
|
|
38
|
+
/** Extra width of line at max zoom. (Default: 0.0) */
|
|
39
|
+
minExtraWidth: number;
|
|
40
|
+
/** Extra width of line at min zoom. (Default: 0.3) */
|
|
41
|
+
maxExtraWidth: number;
|
|
42
|
+
}
|
|
43
|
+
/** Current width of outline. */
|
|
44
|
+
interface State {
|
|
45
|
+
extraWidth: number;
|
|
46
|
+
}
|
|
47
|
+
/** Module for displaying outlines. */
|
|
48
|
+
export default class OutlineModule extends ModuleInterface {
|
|
49
|
+
/** Mapping outline collection name with corresponding uniforms. */
|
|
50
|
+
outlineDict: {
|
|
51
|
+
[key: string]: Uniforms;
|
|
52
|
+
};
|
|
53
|
+
/** Graphic elements currently existing in world space. */
|
|
54
|
+
spawned: PIXI.Mesh[];
|
|
55
|
+
/** Vertex shader for the outlines. */
|
|
56
|
+
static vertexShader: string;
|
|
57
|
+
/** Fragment shader for the outlines. */
|
|
58
|
+
static fragmentShader: string;
|
|
59
|
+
/** Default config. */
|
|
60
|
+
config: Config;
|
|
61
|
+
state: State;
|
|
62
|
+
scaling: (zoom: number) => number;
|
|
63
|
+
constructor(config?: InputConfig);
|
|
64
|
+
/**
|
|
65
|
+
* Set collection of outlines to display. Clears previous content on execution.
|
|
66
|
+
* @param data Outlines to draw
|
|
67
|
+
*/
|
|
68
|
+
set(data: OutlineData[]): void;
|
|
69
|
+
/**
|
|
70
|
+
* Set visibility for outline layers.
|
|
71
|
+
* @param names Names of collections to modify
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* setVisibleLayers(['OWC', 'GOC']);
|
|
75
|
+
*/
|
|
76
|
+
setVisibleLayers(names: string[]): void;
|
|
77
|
+
/** Clear all spawned graphic elements and return to pool. */
|
|
78
|
+
clear(): void;
|
|
79
|
+
resize(zoom: number): void;
|
|
80
|
+
}
|
|
81
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export interface ResizeConfig {
|
|
2
|
-
min: {
|
|
3
|
-
zoom: number;
|
|
4
|
-
scale: number;
|
|
5
|
-
};
|
|
6
|
-
max: {
|
|
7
|
-
zoom: number;
|
|
8
|
-
scale: number;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export interface LabelResizeConfig extends ResizeConfig {
|
|
12
|
-
threshold?: number;
|
|
13
|
-
baseScale?: number;
|
|
14
|
-
}
|
|
1
|
+
export interface ResizeConfig {
|
|
2
|
+
min: {
|
|
3
|
+
zoom: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
};
|
|
6
|
+
max: {
|
|
7
|
+
zoom: number;
|
|
8
|
+
scale: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface LabelResizeConfig extends ResizeConfig {
|
|
12
|
+
threshold?: number;
|
|
13
|
+
baseScale?: number;
|
|
14
|
+
}
|
package/dist/WellboreModule.d.ts
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
import * as PIXI from 'pixi.js';
|
|
2
|
-
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
-
import { Config, InputConfig } from './utils/wellbores/Config';
|
|
4
|
-
import { SourceData, Group, GroupOptions, DetailOptions, WellboreData, RootData } from './utils/wellbores/data';
|
|
5
|
-
import LineDictionary from './utils/LineDictionary';
|
|
6
|
-
import PointDictionary from './utils/PointDictionary';
|
|
7
|
-
import Projector from './utils/wellbores/Projector';
|
|
8
|
-
import { Highlight } from './utils/wellbores/Highlight';
|
|
9
|
-
import AsyncLoop from './utils/wellbores/AsyncLoop';
|
|
10
|
-
import RealtimeWellbore from './utils/wellbores/RealtimeWellbore';
|
|
11
|
-
export default class WellboreModule extends ModuleInterface {
|
|
12
|
-
config: Config;
|
|
13
|
-
groups: {
|
|
14
|
-
[key: string]: Group;
|
|
15
|
-
};
|
|
16
|
-
roots: RootData[];
|
|
17
|
-
asyncLoop: AsyncLoop;
|
|
18
|
-
lineDict: LineDictionary<WellboreData>;
|
|
19
|
-
pointDict: PointDictionary<RootData>;
|
|
20
|
-
highlight: Highlight;
|
|
21
|
-
currentZoom: number;
|
|
22
|
-
private _deferredSelector;
|
|
23
|
-
private _deferredSelectorKeys;
|
|
24
|
-
private _projector;
|
|
25
|
-
private _eventHandler;
|
|
26
|
-
private _redrawAnimFrame;
|
|
27
|
-
containers: {
|
|
28
|
-
wellbores: PIXI.Container;
|
|
29
|
-
roots: PIXI.Container;
|
|
30
|
-
labels: PIXI.Container;
|
|
31
|
-
};
|
|
32
|
-
/** Zoom event handler. */
|
|
33
|
-
scaling: (zoom: number) => number;
|
|
34
|
-
marker: PIXI.Graphics;
|
|
35
|
-
constructor(inputConfig?: InputConfig);
|
|
36
|
-
destroy(): void;
|
|
37
|
-
registerGroup(key: string, options?: GroupOptions): void;
|
|
38
|
-
/**
|
|
39
|
-
* Registers a new detail on given group.
|
|
40
|
-
* @param key Detail key.
|
|
41
|
-
* @param groupKeys Target group keys.
|
|
42
|
-
* @param options
|
|
43
|
-
*/
|
|
44
|
-
registerDetail(key: string, groupKeys: string[], options: DetailOptions): void;
|
|
45
|
-
private addRoot;
|
|
46
|
-
/**
|
|
47
|
-
* Add a single wellbore
|
|
48
|
-
* @param data Wellbore data
|
|
49
|
-
* @param group Group to add wellbore into
|
|
50
|
-
*/
|
|
51
|
-
addWellbore(data: SourceData, group?: Group): void;
|
|
52
|
-
set(wells: SourceData[], key?: string, batchSize?: number): Promise<void>;
|
|
53
|
-
private forAllGroups;
|
|
54
|
-
private forEachGroup;
|
|
55
|
-
private setActive;
|
|
56
|
-
/**
|
|
57
|
-
* Highlight appropriate wellbore(s) at given coordinates.
|
|
58
|
-
* @param lat Target latitude
|
|
59
|
-
* @param long Target longitude
|
|
60
|
-
* @returns True if there is someting to highlight
|
|
61
|
-
*/
|
|
62
|
-
private handleMouseMove;
|
|
63
|
-
private handleMouseOut;
|
|
64
|
-
private handleMouseClick;
|
|
65
|
-
enable(...keys: string[]): void;
|
|
66
|
-
disable(...keys: string[]): void;
|
|
67
|
-
/**
|
|
68
|
-
* Enable/disable labels
|
|
69
|
-
* @param visible
|
|
70
|
-
*/
|
|
71
|
-
setLabelVisibility(visible: boolean): void;
|
|
72
|
-
/**
|
|
73
|
-
* Enable/disable completion
|
|
74
|
-
* @param visible
|
|
75
|
-
* @param keys
|
|
76
|
-
*/
|
|
77
|
-
setCompletionVisibility(visible: boolean, ...keys: string[]): void;
|
|
78
|
-
/**
|
|
79
|
-
* Enable/disable wellbores
|
|
80
|
-
* @param visible
|
|
81
|
-
*/
|
|
82
|
-
setWellboresVisibility(visible: boolean, ...keys: string[]): void;
|
|
83
|
-
/**
|
|
84
|
-
* Enable/disable details
|
|
85
|
-
* @param visible
|
|
86
|
-
* @param key Key of detail to set visibility for
|
|
87
|
-
*/
|
|
88
|
-
setDetailVisibility(visible: boolean, key: string): void;
|
|
89
|
-
/** "Soft" filtering function. Will turn wellbores that does not pass filter gray-ish. */
|
|
90
|
-
softFilter(filterFunction: (v: SourceData) => boolean, ...keys: string[]): void;
|
|
91
|
-
/** "Hard" filtering function. Will turn wellbores that does not pass filter into "ghost" lines. */
|
|
92
|
-
hardFilter(filterFunction: (v: SourceData) => boolean, ...keys: string[]): void;
|
|
93
|
-
clearFilter(...keys: string[]): void;
|
|
94
|
-
setSelected(selectFunction: (v: any) => boolean, ...keys: string[]): void;
|
|
95
|
-
clearSelected(...keys: string[]): void;
|
|
96
|
-
/**
|
|
97
|
-
* Set highlight of wellbore module. Does not override mousemove events.
|
|
98
|
-
* @param name Name of wellbore to highlight
|
|
99
|
-
* @param keys Keys of groups to search. Can improve performance.
|
|
100
|
-
* @returns Screen coordinates (in pixels) of highlighted wellbore's root
|
|
101
|
-
*/
|
|
102
|
-
setHighlight(label: string, ...keys: string[]): RealtimeWellbore;
|
|
103
|
-
clearHighlight(onHighlightOff?: () => void): boolean;
|
|
104
|
-
clearAll(): void;
|
|
105
|
-
/**
|
|
106
|
-
* Clear all data or data mapped to the groups specified by keys
|
|
107
|
-
* @param keys Optional list of keys for which groups to clear
|
|
108
|
-
*/
|
|
109
|
-
clear(...keys: string[]): void;
|
|
110
|
-
resize(zoom: number): void;
|
|
111
|
-
onAdd(map: import('leaflet').Map): void;
|
|
112
|
-
onRemove(_map: import('leaflet').Map): void;
|
|
113
|
-
get projector(): Projector;
|
|
114
|
-
/**
|
|
115
|
-
* Calculate root radius based on formula used in Shader.ts!
|
|
116
|
-
* @param zoom Reference zoom level
|
|
117
|
-
*/
|
|
118
|
-
getRootRadius(zoom?: number): number;
|
|
119
|
-
/**
|
|
120
|
-
* Calculate wellbore radius based on formula used in Shader.ts!
|
|
121
|
-
* @param zoom Reference zoom level
|
|
122
|
-
*/
|
|
123
|
-
getWellboreRadius(zoom?: number): number;
|
|
124
|
-
private getRadius;
|
|
125
|
-
requestRedraw(): void;
|
|
126
|
-
}
|
|
1
|
+
import * as PIXI from 'pixi.js';
|
|
2
|
+
import { ModuleInterface } from './ModuleInterface';
|
|
3
|
+
import { Config, InputConfig } from './utils/wellbores/Config';
|
|
4
|
+
import { SourceData, Group, GroupOptions, DetailOptions, WellboreData, RootData } from './utils/wellbores/data';
|
|
5
|
+
import LineDictionary from './utils/LineDictionary';
|
|
6
|
+
import PointDictionary from './utils/PointDictionary';
|
|
7
|
+
import Projector from './utils/wellbores/Projector';
|
|
8
|
+
import { Highlight } from './utils/wellbores/Highlight';
|
|
9
|
+
import AsyncLoop from './utils/wellbores/AsyncLoop';
|
|
10
|
+
import RealtimeWellbore from './utils/wellbores/RealtimeWellbore';
|
|
11
|
+
export default class WellboreModule extends ModuleInterface {
|
|
12
|
+
config: Config;
|
|
13
|
+
groups: {
|
|
14
|
+
[key: string]: Group;
|
|
15
|
+
};
|
|
16
|
+
roots: RootData[];
|
|
17
|
+
asyncLoop: AsyncLoop;
|
|
18
|
+
lineDict: LineDictionary<WellboreData>;
|
|
19
|
+
pointDict: PointDictionary<RootData>;
|
|
20
|
+
highlight: Highlight;
|
|
21
|
+
currentZoom: number;
|
|
22
|
+
private _deferredSelector;
|
|
23
|
+
private _deferredSelectorKeys;
|
|
24
|
+
private _projector;
|
|
25
|
+
private _eventHandler;
|
|
26
|
+
private _redrawAnimFrame;
|
|
27
|
+
containers: {
|
|
28
|
+
wellbores: PIXI.Container;
|
|
29
|
+
roots: PIXI.Container;
|
|
30
|
+
labels: PIXI.Container;
|
|
31
|
+
};
|
|
32
|
+
/** Zoom event handler. */
|
|
33
|
+
scaling: (zoom: number) => number;
|
|
34
|
+
marker: PIXI.Graphics;
|
|
35
|
+
constructor(inputConfig?: InputConfig);
|
|
36
|
+
destroy(): void;
|
|
37
|
+
registerGroup(key: string, options?: GroupOptions): void;
|
|
38
|
+
/**
|
|
39
|
+
* Registers a new detail on given group.
|
|
40
|
+
* @param key Detail key.
|
|
41
|
+
* @param groupKeys Target group keys.
|
|
42
|
+
* @param options
|
|
43
|
+
*/
|
|
44
|
+
registerDetail(key: string, groupKeys: string[], options: DetailOptions): void;
|
|
45
|
+
private addRoot;
|
|
46
|
+
/**
|
|
47
|
+
* Add a single wellbore
|
|
48
|
+
* @param data Wellbore data
|
|
49
|
+
* @param group Group to add wellbore into
|
|
50
|
+
*/
|
|
51
|
+
addWellbore(data: SourceData, group?: Group): void;
|
|
52
|
+
set(wells: SourceData[], key?: string, batchSize?: number): Promise<void>;
|
|
53
|
+
private forAllGroups;
|
|
54
|
+
private forEachGroup;
|
|
55
|
+
private setActive;
|
|
56
|
+
/**
|
|
57
|
+
* Highlight appropriate wellbore(s) at given coordinates.
|
|
58
|
+
* @param lat Target latitude
|
|
59
|
+
* @param long Target longitude
|
|
60
|
+
* @returns True if there is someting to highlight
|
|
61
|
+
*/
|
|
62
|
+
private handleMouseMove;
|
|
63
|
+
private handleMouseOut;
|
|
64
|
+
private handleMouseClick;
|
|
65
|
+
enable(...keys: string[]): void;
|
|
66
|
+
disable(...keys: string[]): void;
|
|
67
|
+
/**
|
|
68
|
+
* Enable/disable labels
|
|
69
|
+
* @param visible
|
|
70
|
+
*/
|
|
71
|
+
setLabelVisibility(visible: boolean): void;
|
|
72
|
+
/**
|
|
73
|
+
* Enable/disable completion
|
|
74
|
+
* @param visible
|
|
75
|
+
* @param keys
|
|
76
|
+
*/
|
|
77
|
+
setCompletionVisibility(visible: boolean, ...keys: string[]): void;
|
|
78
|
+
/**
|
|
79
|
+
* Enable/disable wellbores
|
|
80
|
+
* @param visible
|
|
81
|
+
*/
|
|
82
|
+
setWellboresVisibility(visible: boolean, ...keys: string[]): void;
|
|
83
|
+
/**
|
|
84
|
+
* Enable/disable details
|
|
85
|
+
* @param visible
|
|
86
|
+
* @param key Key of detail to set visibility for
|
|
87
|
+
*/
|
|
88
|
+
setDetailVisibility(visible: boolean, key: string): void;
|
|
89
|
+
/** "Soft" filtering function. Will turn wellbores that does not pass filter gray-ish. */
|
|
90
|
+
softFilter(filterFunction: (v: SourceData) => boolean, ...keys: string[]): void;
|
|
91
|
+
/** "Hard" filtering function. Will turn wellbores that does not pass filter into "ghost" lines. */
|
|
92
|
+
hardFilter(filterFunction: (v: SourceData) => boolean, ...keys: string[]): void;
|
|
93
|
+
clearFilter(...keys: string[]): void;
|
|
94
|
+
setSelected(selectFunction: (v: any) => boolean, ...keys: string[]): void;
|
|
95
|
+
clearSelected(...keys: string[]): void;
|
|
96
|
+
/**
|
|
97
|
+
* Set highlight of wellbore module. Does not override mousemove events.
|
|
98
|
+
* @param name Name of wellbore to highlight
|
|
99
|
+
* @param keys Keys of groups to search. Can improve performance.
|
|
100
|
+
* @returns Screen coordinates (in pixels) of highlighted wellbore's root
|
|
101
|
+
*/
|
|
102
|
+
setHighlight(label: string, ...keys: string[]): RealtimeWellbore;
|
|
103
|
+
clearHighlight(onHighlightOff?: () => void): boolean;
|
|
104
|
+
clearAll(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Clear all data or data mapped to the groups specified by keys
|
|
107
|
+
* @param keys Optional list of keys for which groups to clear
|
|
108
|
+
*/
|
|
109
|
+
clear(...keys: string[]): void;
|
|
110
|
+
resize(zoom: number): void;
|
|
111
|
+
onAdd(map: import('leaflet').Map): void;
|
|
112
|
+
onRemove(_map: import('leaflet').Map): void;
|
|
113
|
+
get projector(): Projector;
|
|
114
|
+
/**
|
|
115
|
+
* Calculate root radius based on formula used in Shader.ts!
|
|
116
|
+
* @param zoom Reference zoom level
|
|
117
|
+
*/
|
|
118
|
+
getRootRadius(zoom?: number): number;
|
|
119
|
+
/**
|
|
120
|
+
* Calculate wellbore radius based on formula used in Shader.ts!
|
|
121
|
+
* @param zoom Reference zoom level
|
|
122
|
+
*/
|
|
123
|
+
getWellboreRadius(zoom?: number): number;
|
|
124
|
+
private getRadius;
|
|
125
|
+
requestRedraw(): void;
|
|
126
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './ModuleInterface';
|
|
2
|
-
export { default as FaultlineModule } from './FaultlineModule';
|
|
3
|
-
export { default as OutlineModule } from './OutlineModule';
|
|
4
|
-
export { default as WellboreModule } from './WellboreModule';
|
|
5
|
-
export { default as FieldModule } from './FieldModule';
|
|
6
|
-
export { GeoJSONModule } from './GeoJSONModule';
|
|
7
|
-
export * from './EventHandler';
|
|
8
|
-
export { default as ExplorationLayer } from './ExplorationLayer';
|
|
1
|
+
export * from './ModuleInterface';
|
|
2
|
+
export { default as FaultlineModule } from './FaultlineModule';
|
|
3
|
+
export { default as OutlineModule } from './OutlineModule';
|
|
4
|
+
export { default as WellboreModule } from './WellboreModule';
|
|
5
|
+
export { default as FieldModule } from './FieldModule';
|
|
6
|
+
export { GeoJSONModule } from './GeoJSONModule';
|
|
7
|
+
export * from './EventHandler';
|
|
8
|
+
export { default as ExplorationLayer } from './ExplorationLayer';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export interface pixiOverlayBase {
|
|
2
|
-
initialize(drawCallback: any, pixiContainer: any, options: any): void;
|
|
3
|
-
onAdd(targetMap: any): void;
|
|
4
|
-
onRemove(): void;
|
|
5
|
-
getEvents(): any;
|
|
6
|
-
redraw(data?: any): any;
|
|
7
|
-
utils: pixiOverlayUtils;
|
|
8
|
-
}
|
|
9
|
-
export interface pixiOverlayUtils {
|
|
10
|
-
latLngToLayerPoint(latLng: any, zoom?: number): any;
|
|
11
|
-
layerPointToLatLng(point: any, zoom?: number): any;
|
|
12
|
-
getScale(zoom: number): any;
|
|
13
|
-
getRenderer(): any;
|
|
14
|
-
getContainer(): any;
|
|
15
|
-
getMap(): any;
|
|
16
|
-
}
|
|
1
|
+
export interface pixiOverlayBase {
|
|
2
|
+
initialize(drawCallback: any, pixiContainer: any, options: any): void;
|
|
3
|
+
onAdd(targetMap: any): void;
|
|
4
|
+
onRemove(): void;
|
|
5
|
+
getEvents(): any;
|
|
6
|
+
redraw(data?: any): any;
|
|
7
|
+
utils: pixiOverlayUtils;
|
|
8
|
+
}
|
|
9
|
+
export interface pixiOverlayUtils {
|
|
10
|
+
latLngToLayerPoint(latLng: any, zoom?: number): any;
|
|
11
|
+
layerPointToLatLng(point: any, zoom?: number): any;
|
|
12
|
+
getScale(zoom: number): any;
|
|
13
|
+
getRenderer(): any;
|
|
14
|
+
getContainer(): any;
|
|
15
|
+
getMap(): any;
|
|
16
|
+
}
|