Skip to content

Commit 3463ee8

Browse files
author
shengwei zhang
committed
using view and latested color legend still got issue
1 parent b362034 commit 3463ee8

File tree

3 files changed

+65
-20
lines changed

3 files changed

+65
-20
lines changed

react/package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@
5252
"author": "Equinor <[email protected]>",
5353
"license": "MPL",
5454
"dependencies": {
55+
<<<<<<< HEAD
5556
"@emerson-eps/color-tables": "^0.4.43",
57+
=======
58+
"@emerson-eps/color-tables": "^0.4.44",
59+
>>>>>>> 583da83 (using view and latested color legend still got issue)
5660
"@equinor/eds-core-react": "^0.12.1",
5761
"@equinor/eds-icons": "^0.9.1",
5862
"@equinor/videx-wellog": "^0.7.0",

react/src/lib/components/SubsurfaceViewer/SubsurfaceViewer.stories.tsx

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -479,33 +479,62 @@ const MultiColorSelectorTemplate = (args: any) => {
479479
const max = 1000;
480480

481481
const layers = [
482-
{
483-
...args.wellLayers[0],
484-
colorMappingFunction: createColorMapFunction(getColorName),
485-
logColor: getColorName ? getColorName : wellLayers[0].logColor,
486-
isLog: isLog,
487-
},
488482
{
489483
...meshMapLayerFloat32,
490484
colorMapName: colorName,
491485
colorMapRange:
492486
colorRange && isAuto == false ? colorRange : [min, max],
493487
colorMapFunction: colorMapFunc(),
494488
},
489+
{
490+
...args.wellLayers[0],
491+
colorMappingFunction: createColorMapFunction(getColorName),
492+
logColor: getColorName ? getColorName : wellLayers[0].logColor,
493+
isLog: isLog,
494+
depthTest: false,
495+
},
495496
];
496497
return (
497-
<>
498-
<div className={useStyles().colorSelector}>
499-
<div style={{ marginTop: 50, height: 70 }}>
500-
<ColorLegend
498+
// <>
499+
// <div className={useStyles().colorSelector}>
500+
// <div style={{ marginTop: 50, height: 70 }}>
501+
// <ColorLegend
502+
// {...args}
503+
// getScale={wellLayerData}
504+
// getInterpolateMethod={getInterpolateMethod}
505+
// dataObjectName={"WellLogColorSelector"}
506+
// />
507+
// </div>
508+
// <div style={{ marginTop: 50, height: 70 }}>
509+
// <ColorLegend
510+
// min={min}
511+
// max={max}
512+
// colorNameFromSelector={colorNameFromSelector}
513+
// getColorRange={userDefinedRange}
514+
// getInterpolateMethod={getMapLayerInterpolateMethod}
515+
// getBreakpointValue={userDefinedBreakPoint}
516+
// horizontal={true}
517+
// numberOfTicks={2}
518+
// dataObjectName={"MapLayerColorSelector"}
519+
// />
520+
// </div>
521+
// </div>
522+
523+
// <div className={useStyles().main}>
524+
// <DeckGLMap {...args} layers={layers} />
525+
// </div>
526+
// </>
527+
<DeckGLMap {...args} layers={layers}>
528+
{
529+
<View id="view_1">
530+
<ColorLegend
501531
{...args}
502532
getScale={wellLayerData}
503533
getInterpolateMethod={getInterpolateMethod}
504534
dataObjectName={"WellLogColorSelector"}
535+
cssLegendStyle={{ top: 50, left: 0, position: "absolute"}}
505536
/>
506-
</div>
507-
<div style={{ marginTop: 50, height: 70 }}>
508-
<ColorLegend
537+
<ColorLegend
509538
min={min}
510539
max={max}
511540
colorNameFromSelector={colorNameFromSelector}
@@ -516,13 +545,9 @@ const MultiColorSelectorTemplate = (args: any) => {
516545
numberOfTicks={2}
517546
dataObjectName={"MapLayerColorSelector"}
518547
/>
519-
</div>
520-
</div>
521-
522-
<div className={useStyles().main}>
523-
<DeckGLMap {...args} layers={layers} />
524-
</div>
525-
</>
548+
</View>
549+
}
550+
</DeckGLMap>
526551
);
527552
};
528553

0 commit comments

Comments
 (0)