Skip to content

Commit 5cde269

Browse files
authored
Fix checkbox selection for trees (#3719)
* fix tree checkbox selection * update changelog
1 parent f0fa08e commit 5cde269

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
4646
- Fixed a bug where saving tracings failed after they were open for >24h. [#3633](https://github.com/scalableminds/webknossos/pull/3633)
4747
- Fixed a bug that resulted in slow data loading when moving quickly through a dataset. [#3656](https://github.com/scalableminds/webknossos/pull/3656)
4848
- Fixed a bug which caused the wrong magnification to be rendered when zooming out very far. [#3641](https://github.com/scalableminds/webknossos/pull/3641)
49-
49+
- Fixed a bug which broke the functionality to toggle the visibility of a tree in a skeleton tracing. [#3719](https://github.com/scalableminds/webknossos/pull/3719)
5050

5151
## [19.01.0](https://github.com/scalableminds/webknossos/releases/tag/19.01.0) - 2019-01-14
5252
[Commits](https://github.com/scalableminds/webknossos/compare/18.12.0...19.01.0)

app/assets/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ class TreeHierarchyView extends React.PureComponent<Props, State> {
126126
};
127127

128128
onCheck = (evt: SyntheticMouseEvent<*>) => {
129-
const { id, type } = evt.currentTarget.node;
129+
// $FlowFixMe .node is unknown to flow
130+
const { id, type } = evt.target.node;
130131
if (type === TYPE_TREE) {
131132
this.props.onToggleTree(parseInt(id, 10));
132133
} else if (id === MISSING_GROUP_ID) {
@@ -137,7 +138,8 @@ class TreeHierarchyView extends React.PureComponent<Props, State> {
137138
};
138139

139140
onSelectTree = (evt: SyntheticMouseEvent<*>) => {
140-
const treeId = parseInt(evt.currentTarget.dataset.id, 10);
141+
// $FlowFixMe .dataset is unknown to flow
142+
const treeId = parseInt(evt.target.dataset.id, 10);
141143
if (evt.ctrlKey) {
142144
this.props.onSelectTree(treeId);
143145
} else {
@@ -147,7 +149,8 @@ class TreeHierarchyView extends React.PureComponent<Props, State> {
147149
};
148150

149151
onSelectGroup = (evt: SyntheticMouseEvent<*>) => {
150-
const groupId = parseInt(evt.currentTarget.dataset.id, 10);
152+
// $FlowFixMe .dataset is unknown to flow
153+
const groupId = parseInt(evt.target.dataset.id, 10);
151154
const numberOfSelectedTrees = this.props.selectedTrees.length;
152155
const selectGroup = () => {
153156
this.props.deselectAllTrees();

0 commit comments

Comments
 (0)