Skip to content

Commit

Permalink
fix: prevent selection of elements declared as not selectable
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed Jun 21, 2022
1 parent 9a9af93 commit d9c3d69
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/charts/CytoViz/CytoViz.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ export const CytoViz = (props) => {
// Add handling of double click events
cytoscapeRef.on('dbltap', 'node, edge', function (e) {
const selectedElement = e.target;
setCurrentDrawerTab(0);
setIsDrawerOpen(true);
setCurrentElementDetails(getElementDetailsCallback(selectedElement));
if (selectedElement.selectable()) {
setCurrentDrawerTab(0);
setIsDrawerOpen(true);
setCurrentElementDetails(getElementDetailsCallback(selectedElement));
}
});

// Init bubblesets
Expand Down

0 comments on commit d9c3d69

Please sign in to comment.