constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
385 stars 59 forks source link

Layers View: Box selection should not include invisible elements #2187

Closed OrionsGuardian closed 3 weeks ago

OrionsGuardian commented 1 month ago

Prerequisites

Description of the Change

Addressed a Box Selection issue (where you click and drag the mouse over the graph to create a selection area) ...

Currently, when Layers are active, and the graph window is displaying a subset of graph elements appropriate to the active layers ... all elements with x,y coordinates within the selection box are being selected, regardless of their visibility.

The Box Selection functionality should filter out graph elements that are not visible for the active layers.

The code will now check if a graph element has appropriate visibility before being included in the set of elements being selected during a BoxSelection action.

Note: this fix only addresses one of the many issues with integrating layer functionality across the product. See #2182 for more details

Alternate Designs

N/A

Why Should This Be In Core?

Improved/more intuitive UI

Benefits

Improved functionality when Layers are being used.

Verification Process

Create a new empty graph. Open the Layers View. Add a Layer. Active Layer 1. Create a node on the graph (it will be auto-allocated to Layer 1). De-active layer 1, then active Layer 2. Create a node on the graph (it will be auto-allocated to Layer 2). Note: Only node 2 should be visible. Do a Box Selection over the entire graph window. Only node 2 should be selected as it is the only visible node. De-activate Layer 2. You should now see the complete graph with both nodes displaying. Confirm that only the second node is selected.

Applicable Issues

2182

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
17.8% Coverage on New Code
17.6% Duplication on New Code

See analysis details on SonarCloud