Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shengwei zhang committed Jan 20, 2023
1 parent 2695eff commit 1545150
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 66 deletions.
6 changes: 0 additions & 6 deletions react/package-lock.json

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

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
ColorLegend,
colorTables,
} from "@emerson-eps/color-tables";
import { makeStyles } from "@material-ui/core";

export default {
component: SubsurfaceViewer,
Expand Down Expand Up @@ -348,25 +347,6 @@ DepthTest.parameters = {
};

// Example using "Map" layer. Uses float32 float for mesh and properties.
// colorselector for welllayer
const useStyles = makeStyles({
main: {
height: 500,
border: "1px solid black",
position: "relative",
},
colorSelector: {
height: 20,
position: "absolute",
},
legend: {
width: 100,
position: "absolute",
top: "0",
right: "0",
},
});

const wellLayers = [
{
...defaultProps.layers[0],
Expand Down Expand Up @@ -436,7 +416,7 @@ const MultiColorSelectorTemplate = (args: any) => {
setIsLog(data.isLog);
}, []);

const [colorName, setColorName1] = React.useState("GasWater");
const [colorName, setColorName1] = React.useState("Tableau10");
const [colorRange, setRange] = React.useState();
const [isAuto, setAuto] = React.useState();
const [breakPoints, setBreakPoint] = React.useState();
Expand Down Expand Up @@ -495,46 +475,17 @@ const MultiColorSelectorTemplate = (args: any) => {
},
];
return (
// <>
// <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
<SubsurfaceViewer {...args} layers={layers}>
{
<View id="view_1">
<ColorLegend
{...args}
getScale={wellLayerData}
getInterpolateMethod={getInterpolateMethod}
dataObjectName={"WellLogColorSelector"}
cssLegendStyle={{ top: 50, left: 0, position: "absolute"}}
cssLegendStyles={{ top: 50, left: 0 }}
/>
<ColorLegend
<ColorLegend
min={min}
max={max}
colorNameFromSelector={colorNameFromSelector}
Expand All @@ -544,10 +495,11 @@ const MultiColorSelectorTemplate = (args: any) => {
horizontal={true}
numberOfTicks={2}
dataObjectName={"MapLayerColorSelector"}
cssLegendStyles={{ top: 90, left: 0 }}
/>
</View>
}
</DeckGLMap>
</View>
}
</SubsurfaceViewer>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,4 +604,4 @@ LegendWithColorSelector.parameters = {
inlineStories: false,
iframeHeight: 500,
},
};
};

0 comments on commit 1545150

Please sign in to comment.