From 7fe0a50c68ebe3a0ae175b02525f8b35bfb12f7e Mon Sep 17 00:00:00 2001 From: Nils Christian Bonnevie Date: Wed, 20 Sep 2023 13:20:05 +0200 Subject: [PATCH] small fix --- .../subsurface-viewer/src/layers/wells/wellsLayer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts b/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts index e6d645324..2b6b156ba 100644 --- a/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts +++ b/typescript/packages/subsurface-viewer/src/layers/wells/wellsLayer.ts @@ -244,6 +244,10 @@ export default class WellsLayer extends CompositeLayer { initializeState(): void { let data = this.props.data as unknown as FeatureCollection; if (typeof data !== "undefined" && !isEqual(data, [])) { + if (!this.props.ZIncreasingDownwards) { + data = invertPath(data); + } + const refine = this.props.refine; data = refine ? splineRefine(data) // smooth well paths. @@ -251,10 +255,6 @@ export default class WellsLayer extends CompositeLayer { const coarseData = coarsenWells(data); - if (!this.props.ZIncreasingDownwards) { - data = invertPath(data); - } - this.setState({ ...this.state, data,