Skip to content

Commit

Permalink
Fixed bug showing wellpicks for polylines
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Jun 14, 2024
1 parent 36734a8 commit a67c8d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/src/modules/Intersection/utils/layers/BaseLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export enum LayerStatus {
LOADING = "LOADING",
ERROR = "ERROR",
SUCCESS = "SUCCESS",
INVALID_SETTINGS = "INVALID_SETTINGS",
}

export enum LayerTopic {
Expand Down Expand Up @@ -179,6 +180,7 @@ export class BaseLayer<TSettings extends LayerSettings, TData> {
this._lastDataFetchSettings = cloneDeep(this._settings);

if (!this.areSettingsValid()) {
this._status = LayerStatus.INVALID_SETTINGS;
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export function viewAtomsInitialization(
const wellbore = get(settingsToViewInterface.getAtom("wellboreHeader"));
const polyline = get(polylineAtom);
const extensionLength = get(settingsToViewInterface.getAtom("intersectionExtensionLength"));
const intersectionType = get(settingsToViewInterface.getAtom("intersectionType"));

for (const layer of layers) {
if (isGridLayer(layer)) {
Expand All @@ -136,7 +137,10 @@ export function viewAtomsInitialization(
layer.maybeUpdateSettings({ polylineUtmXy: polyline.polylineUtmXy, extensionLength });
}
if (isWellpicksLayer(layer)) {
layer.maybeUpdateSettings({ ensembleIdent, wellboreUuid: wellbore?.uuid });
layer.maybeUpdateSettings({
ensembleIdent,
wellboreUuid: intersectionType === IntersectionType.WELLBORE ? wellbore?.uuid : null,
});
}
layer.maybeRefetchData();
}
Expand Down

0 comments on commit a67c8d9

Please sign in to comment.