Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix copy-buttons in context menu and change out-of-context-menu-click behavior #5658

Merged
merged 4 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Changed
- Improved context menu for interactions with segmentation data which wasn't loaded completely, yet. [#5637](https://github.com/scalableminds/webknossos/pull/5637)
- Clicking outside of the context menu closes it without performing any other action (e.g., previously, a node could be created when clicking outside of the context menu, when the skeleton tool was active). Also, a repeated rightclick doesn't open the context menu again. [#5658](https://github.com/scalableminds/webknossos/pull/5658)

### Fixed
- Fix that active segment and node id were not shown in status bar when being in a non-hybrid annotation. [#5638](https://github.com/scalableminds/webknossos/pull/5638)
- Fix that "Compute Mesh File" button was enabled in scenarios where it should not be supported (e.g., when no segmentation layer exists). [#5648](https://github.com/scalableminds/webknossos/pull/5648)
- Fixed a bug where an authentication error was shown when viewing the meshes tab while not logged in. [#5647](https://github.com/scalableminds/webknossos/pull/5647)
- Fixed that the copy buttons in the context menu did not work properly. [#5658](https://github.com/scalableminds/webknossos/pull/5658)

### Removed
-
Expand Down
9 changes: 8 additions & 1 deletion frontend/javascripts/oxalis/view/context_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,14 @@ function ContextMenu(props: Props) {

return (
<React.Fragment>
<div
className="node-context-menu-overlay"
onClick={hideContextMenu}
onContextMenu={evt => {
evt.preventDefault();
hideContextMenu();
}}
/>
<div
style={{
position: "absolute",
Expand All @@ -452,7 +460,6 @@ function ContextMenu(props: Props) {
}}
className="node-context-menu"
tabIndex={-1}
onBlur={hideContextMenu}
ref={inputRef}
>
<Shortcut supportInputElements keys="escape" onTrigger={hideContextMenu} />
Expand Down
7 changes: 7 additions & 0 deletions frontend/stylesheets/trace_view/_tracing_view.less
Original file line number Diff line number Diff line change
Expand Up @@ -515,3 +515,10 @@ img.keyboard-mouse-icon:first-child {
.hide-if-last:last-child {
display: none;
}

.node-context-menu-overlay {
width: 100%;
height: calc(100% - @navbar-height);
position: absolute;
z-index: 99;
}