Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Jun 7, 2024
1 parent 9eaf356 commit 2307c52
Show file tree
Hide file tree
Showing 41 changed files with 208 additions and 114 deletions.
2 changes: 1 addition & 1 deletion frontend/src/framework/WorkbenchServices.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { Viewport } from "@modules/_shared/components/EsvIntersection/esvIntersection";
import { Viewport } from "@framework/components/EsvIntersection/esvIntersection";

import { isEqual } from "lodash";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export function EsvIntersection(props: EsvIntersectionProps): React.ReactNode {
const cy = dy0 + displ / event.zFactor / event.viewportRatio / 2;

setCurrentViewport([cx, cy, displ]);
timeout = setTimeout(() => onViewportChange([cx, cy, displ]), 100);
onViewportChange([cx, cy, displ]);
}
automaticChanges.current = false;
oldOnRescaleFunction(event);
Expand Down Expand Up @@ -492,9 +492,6 @@ export function EsvIntersection(props: EsvIntersectionProps): React.ReactNode {
newEsvController.removeAllLayers();
newEsvController.destroy();
newInteractionHandler.destroy();
if (timeout) {
clearTimeout(timeout);
}
};
},
[onReadout, onViewportChange, props.intersectionThreshold]
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modules/3DViewer/registerModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ModuleRegistry.registerModule<State, SettingsToViewInterface>({
moduleName: MODULE_NAME,
defaultTitle: "3D Viewer",
category: ModuleCategory.MAIN,
devState: ModuleDevState.DEPRECATED,
devState: ModuleDevState.DEV,
dataTagIds: [ModuleDataTagId.GRID3D, ModuleDataTagId.DRILLED_WELLS],
description,
preview,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { WorkbenchSettings } from "@framework/WorkbenchSettings";
import { EnsembleDropdown } from "@framework/components/EnsembleDropdown";
import { isIsoStringInterval } from "@framework/utils/timestampUtils";
import { Dropdown, DropdownOption } from "@lib/components/Dropdown";
import { Input } from "@lib/components/Input";
import { PendingWrapper } from "@lib/components/PendingWrapper";
import { RadioGroup } from "@lib/components/RadioGroup";
import { SelectOption } from "@lib/components/Select";
Expand Down Expand Up @@ -165,6 +166,10 @@ export const SeismicLayerSettingsComponent: React.FC<SeismicLayerSettingsProps>
props.layer.maybeUpdateSettings({ dateOrInterval: selected });
}

function handleResolutionChange(e: React.ChangeEvent<HTMLInputElement>) {
props.layer.maybeUpdateSettings({ resolution: parseFloat(e.target.value) });
}

function handleColorScaleChange(newColorScale: ColorScale, areBoundariesUserDefined: boolean) {
props.layer.setColorScale(newColorScale);
props.layer.setUseCustomColorScaleBoundaries(areBoundariesUserDefined);
Expand Down Expand Up @@ -269,6 +274,19 @@ export const SeismicLayerSettingsComponent: React.FC<SeismicLayerSettingsProps>
</PendingWrapper>
</div>
</div>
<div className="table-row">
<div className="table-cell align-middle">Sample resolution</div>
<div className="table-cell">
<Input
value={settings.resolution}
onChange={handleResolutionChange}
debounceTimeMs={600}
endAdornment="m"
type="number"
min={1}
/>
</div>
</div>
<div className="table-row">
<div className="table-cell align-top">Color scale</div>
<div className="table-cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const SurfaceLayerSettingsComponent: React.FC<SurfaceLayerSettingsCompone
</div>
</div>
<div className="table-row">
<div className="table-cell align-middle">Resolution</div>
<div className="table-cell align-middle">Sample resolution</div>
<div className="table-cell">
<Input
value={settings.resolution}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
Error,
ExpandLess,
ExpandMore,
HourglassEmpty,

Check failure on line 40 in frontend/src/modules/Intersection/settings/components/layers.tsx

View workflow job for this annotation

GitHub Actions / frontend

'HourglassEmpty' is defined but never used
Settings,
Visibility,
VisibilityOff,
Expand Down Expand Up @@ -426,13 +427,6 @@ function LayerItem(props: LayerItemProps): React.ReactNode {
</div>
);
}
if (status === LayerStatus.IDLE) {
return (
<div title="Loading">
<CircularProgress size="extra-small" />
</div>
);
}
if (status === LayerStatus.ERROR) {
return (
<div title="Error while loading">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class GridLayer extends BaseLayer<GridLayerSettings, AdjustedPolylineInte
this._colorScalesParameterMap.set(this._settings.parameterName ?? "", colorScale);
}

makeBoundingBox(): void {
private makeBoundingBox(): void {
if (!this._data || !this._settings.extensionLength) {
return;
}
Expand Down
Loading

0 comments on commit 2307c52

Please sign in to comment.