@equinor/videx-map 1.14.7 → 1.14.8

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2019 Equinor
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Equinor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,119 +1,120 @@
1
- [![npm version](https://badge.fury.io/js/%40equinor%2Fvidex-map.svg)](https://badge.fury.io/js/%40equinor%2Fvidex-map)
2
- ![](https://github.com/equinor/videx-map/workflows/Unit%20test/badge.svg)
3
-
4
- # Videx map
5
-
6
- A leaflet layer for visualizing wellbore related data.
7
-
8
- - [GitHub Repository](https://github.com/equinor/videx-map)
9
- - [Documentation](https://equinor.github.io/videx-map/)
10
-
11
- ## Installation
12
- ```
13
- npm install --save @equinor/videx-map
14
- ```
15
-
16
- ## Usage
17
- ```js
18
- // ES6
19
- import { WellboreModule, FaultlineModule, ... } from '@equinor/videx-map';
20
- ```
21
-
22
- <br/>
23
-
24
- # Modules
25
- Videx map is divided into various modules with specific purposes. These modules can be used individually or combined into a single WebGL context.
26
-
27
- ## Wellbore Module
28
- Module responsible for visualizing wellbores with roots and paths.
29
-
30
- ### Configurations
31
-
32
- - <b>scale</b> - Relative scale of everything. (Default: 1.0)
33
- - <b>wellboreWidth</b> - Width of wellbore. (Default: 0.15)
34
- - <b>rootRadius</b> - Width of root. (Default: 0.4)
35
- - <b>labelScale</b> - Scale of labels. (Default: 0.011)
36
- - <b>labelBgOpacity</b> - Opacity of label background. (Default: 0.5)
37
- - <b>fontSize</b> - Size of font. (Default: 24)
38
- - <b>batchSize</b> - Amount of wellbores per batch. (Default: 25)
39
- - <b>zoomOrigin</b> - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
40
- - <b>customEventHandler</b> - Provide your custom event handler.
41
- - <b>scaling</b> - Zoom event handler.
42
- - <b>gridSize</b> - Grid size to control resolution of spatial indexing.
43
- - <b>rootResize</b> - Resize configurations of roots.
44
- - <b>onWellboreClick</b> - Function to be called when a wellbore is selected.
45
- - <b>onHighlightOn</b> - Function to be called when wellbores are highlighted.
46
- - <b>onHighlightOff</b> - Function to be called when highlight is removed.
47
-
48
- ```js
49
- // Example configuration
50
- const wellbores: WellboreModule = new WellboreModule({
51
- rootRadius: 0.3,
52
- scale: 1.5,
53
- labelBgOpacity: 0.2,
54
- zoomOrigin: 0,
55
- scaling: zoom => factors[zoom] || 0,
56
- rootResize: {
57
- base: 1.75,
58
- multiplier: 0.5,
59
- zoomReference: 12.0,
60
- },
61
- onHighlightOn: event => {
62
- // Special 'HighlightOn' logic ...
63
- },
64
- onHighlightOff: () => {
65
- // Special 'HighlightOff' logic ...
66
- },
67
- onWellboreClick: wellbore => {
68
- // Special 'WellboreClick' logic ...
69
- }
70
- });
71
- ```
72
-
73
- ## Faultline Module
74
- Module responsible for visualizing faultlines on fields.
75
-
76
- - <b>color</b> - Color of faultline on format 0xRRGGBB. (Default: 0x727D88)
77
- - <b>alpha</b> - Alpha of faultlines. (Default: 1.0)
78
- - <b>outlineWidth</b> - Width of outline. (Default: 0.125)
79
-
80
- ```js
81
- // Example configuration
82
- const faultlines: FaultlineModule = new FaultlineModule({
83
- color: 0xFF00FF,
84
- alpha: 0.75,
85
- outlineWidth: 0.13,
86
- });
87
- ```
88
-
89
- ## Outline Module
90
- Module responsible for visualizing field outlines.
91
-
92
- - <b>zoomOrigin</b> - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
93
- - <b>lineWidth</b> - Width of line. (Default: 0.125)
94
- - <b>scaling</b> - Zoom event handler.
95
-
96
- ```js
97
- // Example configuration
98
- const outlines: OutlineModule = new OutlineModule({
99
- zoomOrigin: 12,
100
- lineWidth: 0.1,
101
- scaling: zoom => (1.5 ** -zoom),
102
- });
103
- ```
104
-
105
- <br/>
106
-
107
- ## Contribution
108
- We greatly appreciate contributions to this repository, see our [contribution page](CONTRIBUTION.md) on how to get started.
109
-
110
- ### Quick start
111
- ```
112
- $ git clone https://github.com/equinor/videx-map.git
113
- $ npm install
114
- $ npm start
115
- ```
116
-
117
-
118
-
119
- ![Equinor Logo](images/equinor-logo.png)
1
+ [![npm version](https://badge.fury.io/js/%40equinor%2Fvidex-map.svg)](https://badge.fury.io/js/%40equinor%2Fvidex-map)
2
+ ![](https://github.com/equinor/videx-map/workflows/Unit%20test/badge.svg)
3
+ [![SCM Compliance](https://scm-compliance-api.radix.equinor.com/repos/equinor/videx-map/badge)](https://scm-compliance-api.radix.equinor.com/repos/equinor/videx-map/badge)
4
+
5
+ # Videx map
6
+
7
+ A leaflet layer for visualizing wellbore related data.
8
+
9
+ - [GitHub Repository](https://github.com/equinor/videx-map)
10
+ - [Documentation](https://equinor.github.io/videx-map/)
11
+
12
+ ## Installation
13
+ ```
14
+ npm install --save @equinor/videx-map
15
+ ```
16
+
17
+ ## Usage
18
+ ```js
19
+ // ES6
20
+ import { WellboreModule, FaultlineModule, ... } from '@equinor/videx-map';
21
+ ```
22
+
23
+ <br/>
24
+
25
+ # Modules
26
+ Videx map is divided into various modules with specific purposes. These modules can be used individually or combined into a single WebGL context.
27
+
28
+ ## Wellbore Module
29
+ Module responsible for visualizing wellbores with roots and paths.
30
+
31
+ ### Configurations
32
+
33
+ - <b>scale</b> - Relative scale of everything. (Default: 1.0)
34
+ - <b>wellboreWidth</b> - Width of wellbore. (Default: 0.15)
35
+ - <b>rootRadius</b> - Width of root. (Default: 0.4)
36
+ - <b>labelScale</b> - Scale of labels. (Default: 0.011)
37
+ - <b>labelBgOpacity</b> - Opacity of label background. (Default: 0.5)
38
+ - <b>fontSize</b> - Size of font. (Default: 24)
39
+ - <b>batchSize</b> - Amount of wellbores per batch. (Default: 25)
40
+ - <b>zoomOrigin</b> - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
41
+ - <b>customEventHandler</b> - Provide your custom event handler.
42
+ - <b>scaling</b> - Zoom event handler.
43
+ - <b>gridSize</b> - Grid size to control resolution of spatial indexing.
44
+ - <b>rootResize</b> - Resize configurations of roots.
45
+ - <b>onWellboreClick</b> - Function to be called when a wellbore is selected.
46
+ - <b>onHighlightOn</b> - Function to be called when wellbores are highlighted.
47
+ - <b>onHighlightOff</b> - Function to be called when highlight is removed.
48
+
49
+ ```js
50
+ // Example configuration
51
+ const wellbores: WellboreModule = new WellboreModule({
52
+ rootRadius: 0.3,
53
+ scale: 1.5,
54
+ labelBgOpacity: 0.2,
55
+ zoomOrigin: 0,
56
+ scaling: zoom => factors[zoom] || 0,
57
+ rootResize: {
58
+ base: 1.75,
59
+ multiplier: 0.5,
60
+ zoomReference: 12.0,
61
+ },
62
+ onHighlightOn: event => {
63
+ // Special 'HighlightOn' logic ...
64
+ },
65
+ onHighlightOff: () => {
66
+ // Special 'HighlightOff' logic ...
67
+ },
68
+ onWellboreClick: wellbore => {
69
+ // Special 'WellboreClick' logic ...
70
+ }
71
+ });
72
+ ```
73
+
74
+ ## Faultline Module
75
+ Module responsible for visualizing faultlines on fields.
76
+
77
+ - <b>color</b> - Color of faultline on format 0xRRGGBB. (Default: 0x727D88)
78
+ - <b>alpha</b> - Alpha of faultlines. (Default: 1.0)
79
+ - <b>outlineWidth</b> - Width of outline. (Default: 0.125)
80
+
81
+ ```js
82
+ // Example configuration
83
+ const faultlines: FaultlineModule = new FaultlineModule({
84
+ color: 0xFF00FF,
85
+ alpha: 0.75,
86
+ outlineWidth: 0.13,
87
+ });
88
+ ```
89
+
90
+ ## Outline Module
91
+ Module responsible for visualizing field outlines.
92
+
93
+ - <b>zoomOrigin</b> - Origin zoom level, i.e. where input for scaling function is 0. (Default: 0)
94
+ - <b>lineWidth</b> - Width of line. (Default: 0.125)
95
+ - <b>scaling</b> - Zoom event handler.
96
+
97
+ ```js
98
+ // Example configuration
99
+ const outlines: OutlineModule = new OutlineModule({
100
+ zoomOrigin: 12,
101
+ lineWidth: 0.1,
102
+ scaling: zoom => (1.5 ** -zoom),
103
+ });
104
+ ```
105
+
106
+ <br/>
107
+
108
+ ## Contribution
109
+ We greatly appreciate contributions to this repository, see our [contribution page](CONTRIBUTION.md) on how to get started.
110
+
111
+ ### Quick start
112
+ ```
113
+ $ git clone https://github.com/equinor/videx-map.git
114
+ $ npm install
115
+ $ npm start
116
+ ```
117
+
118
+
119
+
120
+ ![Equinor Logo](images/equinor-logo.png)
@@ -42,8 +42,9 @@ export default class FaultlineModule extends ModuleInterface {
42
42
  /**
43
43
  * Set collection of faultlines to display. Clears previous content on execution.
44
44
  * @param data Faultlines to draw
45
+ * @param redraw Should pixiOverlay be redrawn after setting data? (Default: false)
45
46
  */
46
- set(data: FaultlineData[]): void;
47
+ set(data: FaultlineData[], redraw?: boolean): void;
47
48
  /** Clear all spawned graphic elements and return to pool. */
48
49
  clear(): void;
49
50
  resize(_zoom: number): void;