From 5cde2698be0fc7c662a238432eaeee6b7e4cd1dd Mon Sep 17 00:00:00 2001 From: Philipp Otto Date: Mon, 4 Feb 2019 14:33:26 +0100 Subject: [PATCH] Fix checkbox selection for trees (#3719) * fix tree checkbox selection * update changelog --- CHANGELOG.md | 2 +- .../oxalis/view/right-menu/tree_hierarchy_view.js | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fd93491a3d..9ffbaa6e176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/app/assets/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js b/app/assets/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js index e390772911b..57baa0f4489 100644 --- a/app/assets/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js +++ b/app/assets/javascripts/oxalis/view/right-menu/tree_hierarchy_view.js @@ -126,7 +126,8 @@ class TreeHierarchyView extends React.PureComponent { }; 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) { @@ -137,7 +138,8 @@ class TreeHierarchyView extends React.PureComponent { }; 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 { @@ -147,7 +149,8 @@ class TreeHierarchyView extends React.PureComponent { }; 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();