cytoscape / cytoscape.js

Graph theory (network) library for visualisation and analysis

Home Page:https://js.cytoscape.org

Repository from Github https://github.comcytoscape/cytoscape.jsRepository from Github https://github.comcytoscape/cytoscape.js

Clicking on non selectable node doesn't unselect

EliotRagueneau opened this issue · comments

Environment info

  • Cytoscape.js version : 3.31.0
  • Browser/Node.js & version : Chromium Engine Version 140.0.7339.133

Current (buggy) behaviour
Clicking on a {selectable: false} node dose not behave as if the node doesn't exist

Desired behaviour

If the unselectable node is on the background, clicking on it should have the same behaviour as clicking on the background, aka unselect.
If there is another selectable node behind the unselectable, it should select the node behind.

That is even more true when the node is also not grabbable and pannable, as then it basically acts as a background element.
Minimum steps to reproduce

https://jsbin.com/kugetej/edit?js,output

Clicking on the red node should act as if you clicked on the element bellow, so for the first one it should select the white node, and on the second it should unselect since it is directly on background

For reviewers

Reviewers should ensure that the following tasks are carried out for incorporated issues:

  • Ensure that the reporter has included a reproducible demo. They can easily fork this JSBin demo: http://jsbin.com/fiqugiq
  • The issue has been associated with a corresponding milestone.
  • The commits have been incorporated into the corresponding branches. Bug-fix patches go on
    • master and
    • unstable.
  • The issue has been labelled as a bug, if necessary.