Skip to content

Commit

Permalink
Merge Fix stratigraphy #64
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickackermann authored Sep 20, 2022
2 parents 146bcd8 + 766bf3f commit ace3003
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/client/src/stratigraphy/stratigraphy.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Stratigraphy = props => {
useEffect(() => {
setState(prevState => ({
...prevState,
selected,
selected: selected ?? null,
}));
}, [selected]);

Expand Down Expand Up @@ -158,9 +158,8 @@ const Stratigraphy = props => {
// add const 1.5 to show the red line in last layer when its selected
pxm:
data.length > 0
? element.current?.clientHeight /
data[data.length - 1][mapping.to] -
1.5
? (element.current?.clientHeight - 1.5) /
data[data.length - 1][mapping.to]
: 0,
}));
}
Expand Down

0 comments on commit ace3003

Please sign in to comment.