Skip to content

Commit 8b16ef3

Browse files
fixed bug that selects a just removed layout (#3379)
* fixed bug that selects a just removed layout
1 parent 2fc489c commit 8b16ef3

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

app/assets/javascripts/oxalis/view/action-bar/tracing_actions_view.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,20 @@ export const ResetLayoutItem = (props: ResetLayoutItemProps) => {
8888
}
8989
>
9090
<span style={{ minWidth: "100%", minHeight: "auto", display: "inline-block" }}>
91-
<div className="inline-with-margin">
91+
<div className="inline-with-margin full-width" onClick={() => onSelectLayout(layout)}>
9292
{layout}
93-
{isSelectedLayout ? (
94-
<Icon type="check" className="sub-menu-item-icon" theme="outlined" />
95-
) : (
96-
<Tooltip placement="top" title="Remove this layout">
97-
<Icon
98-
type="delete"
99-
className="clickable-icon sub-menu-item-icon"
100-
onClick={() => onDeleteLayout(layout)}
101-
/>
102-
</Tooltip>
103-
)}
10493
</div>
94+
{isSelectedLayout ? (
95+
<Icon type="check" className="sub-menu-item-icon" theme="outlined" />
96+
) : (
97+
<Tooltip placement="top" title="Remove this layout">
98+
<Icon
99+
type="delete"
100+
className="clickable-icon sub-menu-item-icon"
101+
onClick={() => onDeleteLayout(layout)}
102+
/>
103+
</Tooltip>
104+
)}
105105
</span>
106106
</Menu.Item>
107107
);

app/assets/stylesheets/trace_view/_action_bar.less

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
margin-right: 36px;
3636
}
3737

38+
.full-width {
39+
width: 100%;
40+
}
41+
3842
.bullet-point-less-li {
3943
list-style-type: none;
4044
}

0 commit comments

Comments
 (0)