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

Interaction attachment order determines entityNearestByXThenY behavior #3420

Open
waltonseymour opened this issue Nov 10, 2017 · 0 comments
Open

Comments

@waltonseymour
Copy link
Contributor

Bug report

When using entityNearestByXThenY inside an onPointerMove callback the returned entity is different depending upon whether or not a panZoom is attached before or after the pointer interaction.

Live example URL: https://jsfiddle.net/8zu0qgp4/6/
Live example URL: https://jsfiddle.net/8zu0qgp4/7/

The difference between these two is simply the order the interactions are attached.

Steps to repro:

  1. Drag to pan in the first example to see the index does not change.
  2. Drag to pan in the second example to see the index changes with the cursor movement.

Expected behavior

I would expect the behavior to remain the same. I think keeping the returned element stable during a pan makes the most sense. It might make sense to have this configurable on the panZoom interaction. Either way this should be documented somehow.

Actual behavior

The returned entities are different between the two orderings.

  • Plottable version: 3.7.0
  • Browser name/version: Chrome 61.0.3163.100
  • OS name/version: MacOS 10.13
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

1 participant