+ {/* TODO: Fix this the next time the file is edited. */}
+ {/* eslint-disable-next-line react/prop-types */}
{this.props.label && (
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
{this.props.label}
)}
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx b/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx
index de233a50f..e405762f8 100644
--- a/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx
+++ b/typescript/packages/well-log-viewer/src/components/WellLogSpacer.tsx
@@ -85,8 +85,13 @@ class WellLogSpacer extends Component
{
constructor(props: WellLogSpacerProps) {
super(props);
this.defs =
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.options?.wellpickPatternFill &&
- this.props.patterns &&
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
+ this.props.patterns && // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
createDefs(this.uid, this.props.patternsTable);
this._isMount = false;
@@ -100,19 +105,34 @@ class WellLogSpacer extends Component
{
prevProps: WellLogSpacerProps /*, prevState: State*/
): void {
// called after render()!?
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (this.props.onCreateSpacer !== prevProps.onCreateSpacer) {
// update callback to component's caller
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.onCreateSpacer?.(this);
}
if (
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.patternsTable !== prevProps.patternsTable ||
- this.props.patterns !== prevProps.patterns ||
- this.props.options?.wellpickPatternFill !==
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
+ this.props.patterns !== prevProps.patterns || // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
+ this.props.options?.wellpickPatternFill !== // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
prevProps.options?.wellpickPatternFill
) {
this.defs =
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.options?.wellpickPatternFill &&
- this.props.patterns &&
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
+ this.props.patterns && // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
createDefs(this.uid, this.props.patternsTable);
this.forceUpdate(); // force to show pattern fill with new this.defs
@@ -122,26 +142,40 @@ class WellLogSpacer extends Component
{
shouldComponentUpdate(
nextProps: WellLogSpacerProps /*, nextState: State*/
): boolean {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (this.props.colorTables !== nextProps.colorTables) {
return true;
}
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (this.props.controllers !== nextProps.controllers) {
return true;
}
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (this.props.wellpicks !== nextProps.wellpicks) {
return true;
}
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (this.props.width !== nextProps.width) {
return true;
}
if (
- this.props.options?.wellpickColorFill !==
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
+ this.props.options?.wellpickColorFill !== // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
nextProps.options?.wellpickColorFill
)
return true;
if (
- this.props.options?.wellpickPatternFill !==
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
+ this.props.options?.wellpickPatternFill !== // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
nextProps.options?.wellpickPatternFill
) {
return true;
@@ -158,6 +192,8 @@ class WellLogSpacer extends Component
{
}
render(): JSX.Element {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const horizontal = this.props.horizontal;
let ymax = 0;
@@ -171,9 +207,15 @@ class WellLogSpacer extends Component
{
let offsetTop = 3000; // try to draw initially out of screen
let offsetLeft = 3000;
let height = 1;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
let width = this.props.width ?? 1;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const controller = this.props.controllers[0] as unknown as WellLogView;
const logViewer = controller?.logController;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const controller2 = this.props.controllers[1] as unknown as WellLogView;
const logViewer2 = controller2?.logController;
const wps = controller ? getWellPicks(controller) : null;
@@ -199,8 +241,13 @@ class WellLogSpacer extends Component
{
//const offset = wpSize / 2;
const patterns =
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.options?.wellpickPatternFill &&
- this.props.patternsTable &&
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
+ this.props.patternsTable && // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.patterns;
for (const wp of wps) {
@@ -371,6 +418,8 @@ class WellLogSpacer extends Component
{
);
});
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const distance = this.props.distance;
return (
@@ -395,10 +444,16 @@ class WellLogSpacer extends Component
{
{!controller?.props.options?.hideTrackTitle ?
: null}
{!controller?.props.options?.hideTrackLegend &&
distance !== undefined &&
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
distance.value !== undefined ? (
{"←" +
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
distance.value.toFixed(0) +
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
distance.units +
"→"}
@@ -424,6 +479,8 @@ class WellLogSpacer extends Component
{
{picks.map(
(value, index) =>
index + 1 < picks.length && [
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.options?.wellpickColorFill &&
value.color && (
= {
id: "Well-Log-View",
horizontal: false,
welllog: welllogDefault,
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
template: require("../../../../../example-data/welllog_template_1.json"),
viewTitle: (
@@ -80,6 +82,8 @@ export const Discrete: StoryObj
= {
id: "Well-Log-View-Discrete",
horizontal: false,
welllog: welllogDiscrete,
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
template: require("../../../../../example-data/welllog_template_2.json"),
viewTitle: "Well '" + welllogDiscrete.header.well + "'",
colorTables: colorTables,
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx b/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx
index 683c76b52..a485ce035 100644
--- a/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx
+++ b/typescript/packages/well-log-viewer/src/components/WellLogView.test.tsx
@@ -5,6 +5,8 @@ import "jest-styled-components";
import React from "react";
import WellLogView from "./WellLogView";
+// TODO: Fix this the next time the file is edited.
+// eslint-disable-next-line @typescript-eslint/no-require-imports
const exampleTemplate = require("../../../../../example-data/welllog_template_1.json");
const exampleWellLog = {
header: {},
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx
index 52261e58b..1f5913286 100644
--- a/typescript/packages/well-log-viewer/src/components/WellLogView.tsx
+++ b/typescript/packages/well-log-viewer/src/components/WellLogView.tsx
@@ -1,3 +1,4 @@
+/* eslint-disable react/prop-types */
import type { ReactNode } from "react";
import React, { Component } from "react";
import { LogViewer } from "@equinor/videx-wellog";
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx
index 733cad740..6c7b23401 100644
--- a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx
+++ b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.stories.tsx
@@ -75,6 +75,8 @@ export const Default: StoryObj = {
id: "Well-Log-Viewer-With-Scroller",
horizontal: false,
welllog: wellLog,
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
template: require("../../../../../example-data/welllog_template_1.json"),
viewTitle: "Well '" + wellLog.header.well + "'",
colorTables: colorTables,
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx
index 53941f147..e10d7d0ad 100644
--- a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx
+++ b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.test.tsx
@@ -5,7 +5,11 @@ import "jest-styled-components";
import React from "react";
import WellLogViewWithScroller from "./WellLogViewWithScroller";
+// TODO: Fix this the next time the file is edited.
+// eslint-disable-next-line @typescript-eslint/no-require-imports
const welllog = require("../../../../../example-data/L898MUD.json")[0];
+// TODO: Fix this the next time the file is edited.
+// eslint-disable-next-line @typescript-eslint/no-require-imports
const template = require("../../../../../example-data/welllog_template_1.json");
window.ResizeObserver =
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx
index 7bcc092dd..c28324260 100644
--- a/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx
+++ b/typescript/packages/well-log-viewer/src/components/WellLogViewWithScroller.tsx
@@ -50,24 +50,34 @@ class WellLogViewWithScroller extends Component {
// callback function from WellLogView
onCreateController(controller: WellLogController): void {
this.controller = controller;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.onCreateController?.(controller);
}
// callback function from WellLogView
onTrackScroll(): void {
this.setScrollerPosAndZoom();
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.onTrackScroll?.();
}
// callback function from WellLogView
onTrackSelection(): void {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.onTrackSelection?.();
}
// callback function from WellLogView
onContentRescale(): void {
this.setScrollerPosAndZoom();
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.onContentRescale?.();
}
// callback function from WellLogView
onContentSelection(): void {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.onContentSelection?.();
}
@@ -82,8 +92,12 @@ class WellLogViewWithScroller extends Component {
const controller = this.controller;
if (!controller) return;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const fContent = this.props.horizontal ? x : y; // fraction
controller.scrollContentTo(fContent);
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const posTrack = this.calcPosTrack(this.props.horizontal ? y : x);
controller.scrollTrackTo(posTrack);
}
@@ -124,12 +138,20 @@ class WellLogViewWithScroller extends Component {
} else {
const contentZoom = controller.getContentZoom();
const trackZoom = controller.getTrackZoom();
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
xZoom = this.props.horizontal ? contentZoom : trackZoom;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
yZoom = this.props.horizontal ? trackZoom : contentZoom;
const fContent = this.getContentPosFraction();
const fTrack = this.getTrackPosFraction();
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
x = this.props.horizontal ? fContent : fTrack;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
y = this.props.horizontal ? fTrack : fContent;
}
@@ -141,17 +163,29 @@ class WellLogViewWithScroller extends Component {
const _x = scroller.getScrollX();
const _y = scroller.getScrollY();
const _posTrack = this.calcPosTrack(
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.horizontal ? _y : _x
);
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const posTrack = this.calcPosTrack(this.props.horizontal ? y : x);
if (posTrack === _posTrack) {
shouldUpdateScroller--;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, react/prop-types
this.props.horizontal ? (y = _y) : (x = _x);
}
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const _fContent = this.props.horizontal ? _x : _y;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const fContent = this.props.horizontal ? x : y;
if (Math.abs(fContent - _fContent) < 0.001) {
shouldUpdateScroller--;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions, react/prop-types
this.props.horizontal ? (x = _x) : (y = _y);
}
}
diff --git a/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx b/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx
index ff7681872..201b622a9 100644
--- a/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx
+++ b/typescript/packages/well-log-viewer/src/components/WellLogZoomSlider.tsx
@@ -40,22 +40,34 @@ export class WellLogZoomSlider extends Component {
}
componentDidMount(): void {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.registerCallbacks(this.props.callbackManager);
}
componentWillUnmount(): void {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.unregisterCallbacks(this.props.callbackManager);
}
componentDidUpdate(prevProps: Props): void {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (prevProps.callbackManager !== this.props.callbackManager) {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.unregisterCallbacks(prevProps.callbackManager);
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.registerCallbacks(this.props.callbackManager);
}
}
onContentRescale(): void {
this.setState((state: Readonly) => {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const controller = this.props.callbackManager?.controller;
if (!controller) return null;
const zoom = controller.getContentZoom();
@@ -68,18 +80,26 @@ export class WellLogZoomSlider extends Component {
// callback function from zoom slider
onZoomSliderChange(zoom: number): void {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.callbackManager?.controller?.zoomContent(zoom);
}
render(): JSX.Element {
return (
+ {/* TODO: Fix this the next time the file is edited. */}
+ {/* eslint-disable-next-line react/prop-types */}
{this.props.label && (
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
{this.props.label}
)}
diff --git a/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx b/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx
index f729d5274..79c105680 100644
--- a/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx
+++ b/typescript/packages/well-log-viewer/src/components/ZoomSlider.tsx
@@ -31,6 +31,8 @@ class ZoomSlider extends Component {
constructor(props: Props) {
super(props);
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const level = convertValueToLevel(this.props.value);
this.state = {
level: level,
@@ -39,8 +41,12 @@ class ZoomSlider extends Component {
}
componentDidUpdate(prevProps: Props): void {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (this.props.value !== prevProps.value) {
this.setState((state: Readonly) => {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
const level = convertValueToLevel(this.props.value);
if (state.level == level) return null;
return { level: level };
@@ -56,7 +62,11 @@ class ZoomSlider extends Component {
if (typeof level !== "number") return;
this.setState((state: Readonly) => {
if (state.level === level) return null;
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
if (this.props.onChange)
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
this.props.onChange(convertLevelToValue(level));
else console.error("ZoomSlider props.onChange not set");
return { level: level as number };
@@ -69,7 +79,11 @@ class ZoomSlider extends Component {
value={this.state.level}
defaultValue={0}
min={0}
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
step={this.props.step || 0.5}
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line react/prop-types
max={convertValueToLevel(this.props.max || 256)}
scale={convertLevelToValue} // convert zoom level to zoom value function
onChange={this.onChange}
diff --git a/typescript/packages/well-log-viewer/src/custom.d.ts b/typescript/packages/well-log-viewer/src/custom.d.ts
index 6e1b25973..2bb55970f 100644
--- a/typescript/packages/well-log-viewer/src/custom.d.ts
+++ b/typescript/packages/well-log-viewer/src/custom.d.ts
@@ -1,4 +1,6 @@
declare module "*.svg" {
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
import React = require("react");
export const ReactComponent: React.SFC>;
const src: string;
diff --git a/typescript/packages/well-log-viewer/src/utils/tracks.ts b/typescript/packages/well-log-viewer/src/utils/tracks.ts
index 6b8d99469..018a79a3d 100644
--- a/typescript/packages/well-log-viewer/src/utils/tracks.ts
+++ b/typescript/packages/well-log-viewer/src/utils/tracks.ts
@@ -572,6 +572,8 @@ function updateStackedTrackScale(track: StackedTrack): void {
//if (!track.options.scale) throw Error("Invalid track.options.scale!");
//track.trackScale = createScale(track.options.scale, track.options.domain);
+ // TODO: Fix this the next time the file is edited.
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
track.xscale;
}