Skip to content

WebGL: group selection in bounding boxes broken #3406

@svozza

Description

@svozza

Environment info

  • Cytoscape.js version : 3.33.0
  • Browser/Node.js & version : Node 22

Current (buggy) behaviour

I have a diagram where nodes are contained in multiple bounding boxes, when I click on some (but not all) of the bounding boxes the nodes in the bounding box do not get selected.

Desired behaviour

When I click on a bounding box, all the nodes in the box should get selected. When I disable WebGL, everything works as expected.

Minimum steps to reproduce

What do you need to do to reproduce the issue?

  1. Create a graph with several grouped nodes, i.e., parent child relationships.
  2. Attempt to select any of the groups.
  3. The select event does not appear to register

See the below screen recordings.

WebGL enabled:

Image

WebGL disabled

Image

Literally the only difference between these two examples are that I have set the WebGL boolean:

 // Create a new Cytoscape instance with conditional WebGL rendering options
        const cy = cytoscape({
            container: containerRef.current,
            elements: [], // Start with empty graph
            style: graphStyle,
            renderer: {
                name: 'canvas',
                webgl: false, // <= changing this to true causes the bug
            },
        });

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug in the code of Cytoscape.js

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions