Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetClosest method doesn't handle nested elements #181

Closed
faeriedust opened this issue May 17, 2016 · 3 comments
Closed

GetClosest method doesn't handle nested elements #181

faeriedust opened this issue May 17, 2016 · 3 comments
Milestone

Comments

@faeriedust
Copy link

faeriedust commented May 17, 2016

In the vertical search case, it condenses each of the "hits" above and below it into single points and finds the closest one to the position and returns that element.

However, this is not correct in the case that there are nested elements above/below it.

It should return the one with a nearest edge to the position at the very worst.

My example:
I have a ListView of Jobs where each ListViewItem is an inner ListView of Tasks.
If I click below the lowest Job, I would expect the FindClosest Method to be returning the lowest Job.
However, if there is a task inside that job, and directly above the clicked position, the Task will be returned instead because it is "lower" than the job that it's nested inside.

@faeriedust
Copy link
Author

Possible fix is to take item size into account to find the nearest border and find the distance from that?

@faeriedust
Copy link
Author

https://github.com/faeriedust/GongWPFDemo illustrates the bug in question

@punker76 punker76 added this to the v1.0.0 milestone Aug 1, 2016
@punker76
Copy link
Owner

punker76 commented Aug 1, 2016

@faeriedust This should be fixed with f877268

@punker76 punker76 closed this as completed Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants