Skip to content

Commit

Permalink
Fix checkbox selection for trees (#3719)
Browse files Browse the repository at this point in the history
* fix tree checkbox selection

* update changelog
  • Loading branch information
philippotto committed Feb 4, 2019
1 parent f0fa08e commit 5cde269
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
- Fixed a bug where saving tracings failed after they were open for >24h. [#3633](https://github.com/scalableminds/webknossos/pull/3633)
- Fixed a bug that resulted in slow data loading when moving quickly through a dataset. [#3656](https://github.com/scalableminds/webknossos/pull/3656)
- Fixed a bug which caused the wrong magnification to be rendered when zooming out very far. [#3641](https://github.com/scalableminds/webknossos/pull/3641)

- 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)

## [19.01.0](https://github.com/scalableminds/webknossos/releases/tag/19.01.0) - 2019-01-14
[Commits](https://github.com/scalableminds/webknossos/compare/18.12.0...19.01.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ class TreeHierarchyView extends React.PureComponent<Props, State> {
};

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

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

onSelectGroup = (evt: SyntheticMouseEvent<*>) => {
const groupId = parseInt(evt.currentTarget.dataset.id, 10);
// $FlowFixMe .dataset is unknown to flow
const groupId = parseInt(evt.target.dataset.id, 10);
const numberOfSelectedTrees = this.props.selectedTrees.length;
const selectGroup = () => {
this.props.deselectAllTrees();
Expand Down

0 comments on commit 5cde269

Please sign in to comment.