@equinor/esv-intersection 3.0.7 → 3.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/esv-intersection",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "Intersection component package with testing and automatic documentation.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -91,12 +91,12 @@ export async function generateSeismicSliceImage(
91
91
  data: { datapoints: number[][]; yAxisValues: number[] },
92
92
  trajectory: number[][],
93
93
  colormap: string[],
94
- options?: {
95
- isLeftToRight: true;
94
+ options: {
95
+ isLeftToRight: boolean;
96
96
  seismicRange?: number;
97
97
  seismicMin?: number;
98
98
  seismicMax?: number;
99
- },
99
+ } = { isLeftToRight: true },
100
100
  ): Promise<ImageBitmap | undefined> {
101
101
  if (!(data && data.datapoints && data.datapoints.length > 0)) {
102
102
  return undefined;
@@ -132,7 +132,7 @@ export async function generateSeismicSliceImage(
132
132
  let offset = 0;
133
133
  const colorFactor = (colorTableSize - 1) / domain.difference;
134
134
 
135
- let pos = options?.isLeftToRight ? trajectory[0][0] : trajectory[trajectory.length - 1][0];
135
+ let pos = options?.isLeftToRight == null ? trajectory[0][0] : trajectory[trajectory.length - 1][0];
136
136
 
137
137
  const step = (length / width) * (options?.isLeftToRight ? -1 : 1);
138
138