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

MockInteractions.trackTo #57

Open
icmdaf opened this issue Jun 13, 2016 · 0 comments
Open

MockInteractions.trackTo #57

icmdaf opened this issue Jun 13, 2016 · 0 comments

Comments

@icmdaf
Copy link

icmdaf commented Jun 13, 2016

Currently MockInteractions.track(element, dx, dy) is relative only, it would be useful to have a version that accepts absolute end coordinates, for example to test dragging one element onto another one:

   MockInteractions.trackTo(movable, MockInteractions.middleOfNode(target));

instead of the current cumbersome

  const s = MockInteractions.middleOfNode(movable);
  const t = MockInteractions.middleOfNode(target);
  MockInteractions.track(movable, t.x - s.x, t.y - s.y);
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