microsoft / microsoft/automatic-graph-layout

Microsoft.Msagl.WpfGraphControl.GraphViewer.ObjectUnderMouseCursor is always null

Open
#214 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.5k
Forks
319
Avg merge
38m
Merged PRs (30d)
1

Description

Edit the MinWpfApp sample and add the following code at the end of the GraphViewer initialization:

graphViewer.MouseUp += (o, args) => {
                var viewer = (GraphViewer) o;
                var obj = viewer.ObjectUnderMouseCursor;
            };

obj is always null when clicking on nodes. Also, args.Clicks seems to always be 1 even on double clicks (though this might be a separate issue)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open GraphLayout/Samples/MinWpfApp/MainWindow.xaml.cs around line 38 and reproduce the issue using the added MouseUp handler. Trace how GraphViewer determines ObjectUnderMouseCursor when a node is clicked, and verify the behavior in the MinWpfApp sample. Done means the clicked node is exposed through ObjectUnderMouseCursor; treat the double-click count as a separate question unless the investigation connects them.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.