Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna Li committed Oct 11, 2023
1 parent 3bd5c45 commit c0905de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/viewer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ export default class App extends React.Component<Props, State> {
currentStructureMatchIndex: null,
currentStructureMatch: [],
lastSelectedRow: undefined,
// collapsibleRows: {},
collapsibleRows: { 1: constructNewSegment(1, 10, 0), 2: constructNewSegment(2, 6, 1), 5: constructNewSegment(5, 15, 0), 7: constructNewSegment(7, 10, 1), 0 : constructNewSegment(0, 20, 2)},
collapsibleRows: {},
};

this.onMessage = this.onMessage.bind(this);
Expand Down
4 changes: 1 addition & 3 deletions src/viewer/hooks/useStyleManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,10 @@ export const getSegmentStyle = (columnWidth: number, height: number): React.CSSP

export const getSegmentRowStyle = (segmentWidth: number, top: number): React.CSSProperties => {
const segmentRowStyle: React.CSSProperties = {
position: "sticky",
position: "absolute",
height: LOG_ROW_HEIGHT,
top: top,
width: segmentWidth,
left: 0,
zIndex: 100,
}
return segmentRowStyle;
}
Expand Down
14 changes: 8 additions & 6 deletions src/viewer/log/LogView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,14 @@ export default class LogView extends React.Component<Props, State> {
result.push(
<div style={{ display: "flex", flexDirection: "row", flexWrap: "nowrap" }}>
{Object.keys(this.props.collapsibleRows).length > 0 &&
<div
style={segmentStyle}
key={"seg" + r}
className="box1"
>
{rowResult}
<div style= {{ position: "sticky", left: 0 , zIndex: 100}}>
<div
style={segmentStyle}
key={"seg" + r}
className="box1"
>
{rowResult}
</div>
</div>}
<div
key={r}
Expand Down

0 comments on commit c0905de

Please sign in to comment.