Skip to content

Commit

Permalink
using view and latested color legend still got issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shengwei zhang committed Jan 20, 2023
1 parent b362034 commit 3463ee8
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 20 deletions.
16 changes: 16 additions & 0 deletions react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
"author": "Equinor <[email protected]>",
"license": "MPL",
"dependencies": {
<<<<<<< HEAD
"@emerson-eps/color-tables": "^0.4.43",
=======
"@emerson-eps/color-tables": "^0.4.44",
>>>>>>> 583da83 (using view and latested color legend still got issue)
"@equinor/eds-core-react": "^0.12.1",
"@equinor/eds-icons": "^0.9.1",
"@equinor/videx-wellog": "^0.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,33 +479,62 @@ const MultiColorSelectorTemplate = (args: any) => {
const max = 1000;

const layers = [
{
...args.wellLayers[0],
colorMappingFunction: createColorMapFunction(getColorName),
logColor: getColorName ? getColorName : wellLayers[0].logColor,
isLog: isLog,
},
{
...meshMapLayerFloat32,
colorMapName: colorName,
colorMapRange:
colorRange && isAuto == false ? colorRange : [min, max],
colorMapFunction: colorMapFunc(),
},
{
...args.wellLayers[0],
colorMappingFunction: createColorMapFunction(getColorName),
logColor: getColorName ? getColorName : wellLayers[0].logColor,
isLog: isLog,
depthTest: false,
},
];
return (
<>
<div className={useStyles().colorSelector}>
<div style={{ marginTop: 50, height: 70 }}>
<ColorLegend
// <>
// <div className={useStyles().colorSelector}>
// <div style={{ marginTop: 50, height: 70 }}>
// <ColorLegend
// {...args}
// getScale={wellLayerData}
// getInterpolateMethod={getInterpolateMethod}
// dataObjectName={"WellLogColorSelector"}
// />
// </div>
// <div style={{ marginTop: 50, height: 70 }}>
// <ColorLegend
// min={min}
// max={max}
// colorNameFromSelector={colorNameFromSelector}
// getColorRange={userDefinedRange}
// getInterpolateMethod={getMapLayerInterpolateMethod}
// getBreakpointValue={userDefinedBreakPoint}
// horizontal={true}
// numberOfTicks={2}
// dataObjectName={"MapLayerColorSelector"}
// />
// </div>
// </div>

// <div className={useStyles().main}>
// <DeckGLMap {...args} layers={layers} />
// </div>
// </>
<DeckGLMap {...args} layers={layers}>
{
<View id="view_1">
<ColorLegend
{...args}
getScale={wellLayerData}
getInterpolateMethod={getInterpolateMethod}
dataObjectName={"WellLogColorSelector"}
cssLegendStyle={{ top: 50, left: 0, position: "absolute"}}
/>
</div>
<div style={{ marginTop: 50, height: 70 }}>
<ColorLegend
<ColorLegend
min={min}
max={max}
colorNameFromSelector={colorNameFromSelector}
Expand All @@ -516,13 +545,9 @@ const MultiColorSelectorTemplate = (args: any) => {
numberOfTicks={2}
dataObjectName={"MapLayerColorSelector"}
/>
</div>
</div>

<div className={useStyles().main}>
<DeckGLMap {...args} layers={layers} />
</div>
</>
</View>
}
</DeckGLMap>
);
};

Expand Down

0 comments on commit 3463ee8

Please sign in to comment.